-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5237 Removing old flowchart renderer
- Loading branch information
Showing
6 changed files
with
7 additions
and
1,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}, | ||
}; |
Oops, something went wrong.