Skip to content

Commit

Permalink
#5237 Removing old flowchart renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Aug 9, 2024
1 parent 729080f commit ba0d216
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1,453 deletions.
4 changes: 2 additions & 2 deletions packages/mermaid/src/diagrams/flowchart/flowDiagram-v2.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// @ts-ignore: JISON doesn't support types
import flowParser from './parser/flow.jison';
import flowDb from './flowDb.js';
import flowRendererV3 from './flowRenderer-v3-unified.js';
import renderer from './flowRenderer-v3-unified.js';
import flowStyles from './styles.js';
import type { MermaidConfig } from '../../config.type.js';
import { setConfig } from '../../diagram-api/diagramAPI.js';

export const diagram = {
parser: flowParser,
db: flowDb,
renderer: flowRendererV3,
renderer,
styles: flowStyles,
init: (cnf: MermaidConfig) => {
if (!cnf.flowchart) {
Expand Down
11 changes: 5 additions & 6 deletions packages/mermaid/src/diagrams/flowchart/flowDiagram.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
// @ts-ignore: JISON doesn't support types
import flowParser from './parser/flow.jison';
import flowDb from './flowDb.js';
import flowRenderer from './flowRenderer.js';
import flowRendererV2 from './flowRenderer-v2.js';
import renderer from './flowRenderer-v3-unified.js';
import flowStyles from './styles.js';
import type { MermaidConfig } from '../../config.type.js';
import { setConfig } from '../../diagram-api/diagramAPI.js';

export const diagram = {
parser: flowParser,
db: flowDb,
renderer: flowRendererV2,
renderer,
styles: flowStyles,
init: (cnf: MermaidConfig) => {
if (!cnf.flowchart) {
cnf.flowchart = {};
}
// TODO, broken as of 2022-09-14 (13809b50251845475e6dca65cc395761be38fbd2)
cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
flowRenderer.setConf(cnf.flowchart);
setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });
flowDb.clear();
flowDb.setGen('gen-1');
flowDb.setGen('gen-2');
},
};
Loading

0 comments on commit ba0d216

Please sign in to comment.