Merge pull request #3840 from weedySeaDragon/chore/fix-lint-pie-console-stmt

(chore) remove console stmt in pieDetector
This commit is contained in:
Sidharth Vinod 2022-11-22 10:53:06 +05:30 committed by GitHub
commit 231965d36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 9 deletions

View File

@ -2,6 +2,5 @@ import type { DiagramDetector } from '../../diagram-api/types';
export const pieDetector: DiagramDetector = (txt) => {
const logOutput = txt.match(/^\s*pie/) !== null || txt.match(/^\s*bar/) !== null;
console.log(logOutput);
return logOutput;
};

View File

@ -161,9 +161,9 @@ let conf = configApi.getConfig();
// .attr('transform', function (d, i) {
// var height = legendRectSize + legendSpacing;
// var offset = (height * color.domain().length) / 2;
// var horz = 12 * legendRectSize;
// var vert = i * height - offset;
// return 'translate(' + horz + ',' + vert + ')';
// var horizontal = 12 * legendRectSize;
// var vertical = i * height - offset;
// return 'translate(' + horizontal + ',' + vertical + ')';
// });
// legend
@ -337,11 +337,11 @@ export const draw = (txt, id, _version, diagObj) => {
.append('g')
.attr('class', 'legend')
.attr('transform', function (d, i) {
var height = legendRectSize + legendSpacing;
var offset = (height * color.domain().length) / 2;
var horz = 12 * legendRectSize;
var vert = i * height - offset;
return 'translate(' + horz + ',' + vert + ')';
const height = legendRectSize + legendSpacing;
const offset = (height * color.domain().length) / 2;
const horizontal = 12 * legendRectSize;
const vertical = i * height - offset;
return 'translate(' + horizontal + ',' + vertical + ')';
});
legend