chore: Remove unused comments

This commit is contained in:
Sidharth Vinod
2024-06-28 21:36:58 +05:30
parent 93b41eddb9
commit ced5cef2a3
4 changed files with 11 additions and 21 deletions

View File

@@ -348,11 +348,6 @@ export const addEdges = function (dataForLayout, graph, svg) {
edgeData.style = 'stroke-width: 3.5px;fill:none;';
break;
}
// if (edge.style !== undefined) {
// const styles = getStylesFromArray(edge.style);
// style = styles.style;
// labelStyle = styles.labelStyle;
// }
edgeData.style = edgeData.style += style;
edgeData.labelStyle = edgeData.labelStyle += labelStyle;

View File

@@ -26,7 +26,7 @@ const detector: DiagramDetector = (txt, config): boolean => {
}
return false;
};
// @ts-ignore - TODO: Fix after refactor
const loader: DiagramLoader = async () => {
const { diagram } = await import('../flowDiagram-v2.js');
return { id, diagram };

View File

@@ -1,7 +1,6 @@
// @ts-ignore: JISON doesn't support types
import flowParser from './parser/flow.jison';
import flowDb from './flowDb.js';
//import flowRendererV2 from './flowRenderer-v2.js';
import flowRendererV3 from './flowRenderer-v3-unified.js';
import flowStyles from './styles.js';
import type { MermaidConfig } from '../../config.type.js';
@@ -10,7 +9,6 @@ import { setConfig } from '../../diagram-api/diagramAPI.js';
export const diagram = {
parser: flowParser,
db: flowDb,
// renderer: flowRendererV2,
renderer: flowRendererV3,
styles: flowStyles,
init: (cnf: MermaidConfig) => {
@@ -20,7 +18,6 @@ export const diagram = {
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
// flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf
setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
// flowRendererV2.setConf(cnf.flowchart);
flowRendererV3.setConf(cnf.flowchart);
flowDb.clear();
flowDb.setGen('gen-2');

View File

@@ -1,14 +1,13 @@
import { log } from '../../logger.js';
import type { DiagramStyleClassDef } from '../../diagram-api/types.js';
import type { LayoutData } from '../../rendering-util/types.js';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import { render } from '../../rendering-util/render.js';
import { getDiagramElements } from '../../rendering-util/insertElementsForSize.js';
import { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';
import { getDirection } from './flowDb.js';
import utils from '../../utils.js';
import { select } from 'd3';
import { getConfig } from '../../diagram-api/diagramAPI.js';
import type { DiagramStyleClassDef } from '../../diagram-api/types.js';
import { log } from '../../logger.js';
import { getDiagramElements } from '../../rendering-util/insertElementsForSize.js';
import { render } from '../../rendering-util/render.js';
import { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';
import type { LayoutData } from '../../rendering-util/types.js';
import utils from '../../utils.js';
import { getDirection } from './flowDb.js';
// Configuration
const conf: Record<string, any> = {};
@@ -23,8 +22,7 @@ export const setConf = function (cnf: Record<string, any>) {
export const getClasses = function (
text: string,
diagramObj: any
): Record<string, DiagramStyleClassDef> {
// diagramObj.db.extract(diagramObj.db.getRootDocV2());
): Map<string, DiagramStyleClassDef> {
return diagramObj.db.getClasses();
};