mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 10:20:06 +02:00
Merge pull request #3840 from weedySeaDragon/chore/fix-lint-pie-console-stmt
(chore) remove console stmt in pieDetector
This commit is contained in:
@@ -2,6 +2,5 @@ import type { DiagramDetector } from '../../diagram-api/types';
|
|||||||
|
|
||||||
export const pieDetector: DiagramDetector = (txt) => {
|
export const pieDetector: DiagramDetector = (txt) => {
|
||||||
const logOutput = txt.match(/^\s*pie/) !== null || txt.match(/^\s*bar/) !== null;
|
const logOutput = txt.match(/^\s*pie/) !== null || txt.match(/^\s*bar/) !== null;
|
||||||
console.log(logOutput);
|
|
||||||
return logOutput;
|
return logOutput;
|
||||||
};
|
};
|
||||||
|
@@ -161,9 +161,9 @@ let conf = configApi.getConfig();
|
|||||||
// .attr('transform', function (d, i) {
|
// .attr('transform', function (d, i) {
|
||||||
// var height = legendRectSize + legendSpacing;
|
// var height = legendRectSize + legendSpacing;
|
||||||
// var offset = (height * color.domain().length) / 2;
|
// var offset = (height * color.domain().length) / 2;
|
||||||
// var horz = 12 * legendRectSize;
|
// var horizontal = 12 * legendRectSize;
|
||||||
// var vert = i * height - offset;
|
// var vertical = i * height - offset;
|
||||||
// return 'translate(' + horz + ',' + vert + ')';
|
// return 'translate(' + horizontal + ',' + vertical + ')';
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// legend
|
// legend
|
||||||
@@ -337,11 +337,11 @@ export const draw = (txt, id, _version, diagObj) => {
|
|||||||
.append('g')
|
.append('g')
|
||||||
.attr('class', 'legend')
|
.attr('class', 'legend')
|
||||||
.attr('transform', function (d, i) {
|
.attr('transform', function (d, i) {
|
||||||
var height = legendRectSize + legendSpacing;
|
const height = legendRectSize + legendSpacing;
|
||||||
var offset = (height * color.domain().length) / 2;
|
const offset = (height * color.domain().length) / 2;
|
||||||
var horz = 12 * legendRectSize;
|
const horizontal = 12 * legendRectSize;
|
||||||
var vert = i * height - offset;
|
const vertical = i * height - offset;
|
||||||
return 'translate(' + horz + ',' + vert + ')';
|
return 'translate(' + horizontal + ',' + vertical + ')';
|
||||||
});
|
});
|
||||||
|
|
||||||
legend
|
legend
|
||||||
|
Reference in New Issue
Block a user