mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-21 17:26:45 +02:00
chore: Remove unused comments
This commit is contained in:
@@ -348,11 +348,6 @@ export const addEdges = function (dataForLayout, graph, svg) {
|
|||||||
edgeData.style = 'stroke-width: 3.5px;fill:none;';
|
edgeData.style = 'stroke-width: 3.5px;fill:none;';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if (edge.style !== undefined) {
|
|
||||||
// const styles = getStylesFromArray(edge.style);
|
|
||||||
// style = styles.style;
|
|
||||||
// labelStyle = styles.labelStyle;
|
|
||||||
// }
|
|
||||||
|
|
||||||
edgeData.style = edgeData.style += style;
|
edgeData.style = edgeData.style += style;
|
||||||
edgeData.labelStyle = edgeData.labelStyle += labelStyle;
|
edgeData.labelStyle = edgeData.labelStyle += labelStyle;
|
||||||
|
@@ -26,7 +26,7 @@ const detector: DiagramDetector = (txt, config): boolean => {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
// @ts-ignore - TODO: Fix after refactor
|
|
||||||
const loader: DiagramLoader = async () => {
|
const loader: DiagramLoader = async () => {
|
||||||
const { diagram } = await import('../flowDiagram-v2.js');
|
const { diagram } = await import('../flowDiagram-v2.js');
|
||||||
return { id, diagram };
|
return { id, diagram };
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
// @ts-ignore: JISON doesn't support types
|
// @ts-ignore: JISON doesn't support types
|
||||||
import flowParser from './parser/flow.jison';
|
import flowParser from './parser/flow.jison';
|
||||||
import flowDb from './flowDb.js';
|
import flowDb from './flowDb.js';
|
||||||
//import flowRendererV2 from './flowRenderer-v2.js';
|
|
||||||
import flowRendererV3 from './flowRenderer-v3-unified.js';
|
import flowRendererV3 from './flowRenderer-v3-unified.js';
|
||||||
import flowStyles from './styles.js';
|
import flowStyles from './styles.js';
|
||||||
import type { MermaidConfig } from '../../config.type.js';
|
import type { MermaidConfig } from '../../config.type.js';
|
||||||
@@ -10,7 +9,6 @@ import { setConfig } from '../../diagram-api/diagramAPI.js';
|
|||||||
export const diagram = {
|
export const diagram = {
|
||||||
parser: flowParser,
|
parser: flowParser,
|
||||||
db: flowDb,
|
db: flowDb,
|
||||||
// renderer: flowRendererV2,
|
|
||||||
renderer: flowRendererV3,
|
renderer: flowRendererV3,
|
||||||
styles: flowStyles,
|
styles: flowStyles,
|
||||||
init: (cnf: MermaidConfig) => {
|
init: (cnf: MermaidConfig) => {
|
||||||
@@ -20,7 +18,6 @@ export const diagram = {
|
|||||||
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
|
||||||
// flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf
|
// flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf
|
||||||
setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
|
setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
|
||||||
// flowRendererV2.setConf(cnf.flowchart);
|
|
||||||
flowRendererV3.setConf(cnf.flowchart);
|
flowRendererV3.setConf(cnf.flowchart);
|
||||||
flowDb.clear();
|
flowDb.clear();
|
||||||
flowDb.setGen('gen-2');
|
flowDb.setGen('gen-2');
|
||||||
|
@@ -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 { 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
|
// Configuration
|
||||||
const conf: Record<string, any> = {};
|
const conf: Record<string, any> = {};
|
||||||
@@ -23,8 +22,7 @@ export const setConf = function (cnf: Record<string, any>) {
|
|||||||
export const getClasses = function (
|
export const getClasses = function (
|
||||||
text: string,
|
text: string,
|
||||||
diagramObj: any
|
diagramObj: any
|
||||||
): Record<string, DiagramStyleClassDef> {
|
): Map<string, DiagramStyleClassDef> {
|
||||||
// diagramObj.db.extract(diagramObj.db.getRootDocV2());
|
|
||||||
return diagramObj.db.getClasses();
|
return diagramObj.db.getClasses();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user