Merge pull request #1388 from mermaid-js/1386_finetuning_rendering_engine

1386 finetuning rendering engine
This commit is contained in:
Knut Sveidqvist
2020-05-13 17:36:12 +02:00
committed by GitHub
10 changed files with 226 additions and 99 deletions

View File

@@ -736,7 +736,7 @@ const render = function(id, _txt, cb, container) {
}
// classDef
if (graphType === 'flowchart') {
if (graphType === 'flowchart' || graphType === 'flowchart-v2') {
const classes = flowRenderer.getClasses(txt);
for (const className in classes) {
style += `\n.${className} > * { ${classes[className].styles.join(
@@ -858,6 +858,7 @@ const render = function(id, _txt, cb, container) {
if (typeof cb !== 'undefined') {
switch (graphType) {
case 'flowchart':
case 'flowchart-v2':
cb(svgCode, flowDb.bindFunctions);
break;
case 'gantt':