#2111 Handling 'false' as false

This commit is contained in:
Knut Sveidqvist
2021-06-03 20:47:24 +02:00
parent bf21aa8cd6
commit aa2596b457
17 changed files with 186 additions and 181 deletions

View File

@@ -54,6 +54,7 @@ import journeyDb from './diagrams/user-journey/journeyDb';
import journeyRenderer from './diagrams/user-journey/journeyRenderer';
import journeyParser from './diagrams/user-journey/parser/journey';
import errorRenderer from './errorRenderer';
import { evaluate } from './diagrams/common/common';
// import * as configApi from './config';
// // , {
// // setConfig,
@@ -297,8 +298,9 @@ const render = function(id, _txt, cb, container) {
// classDef
if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
const classes = flowRenderer.getClasses(txt);
const htmlLabels = evaluate(cnf.htmlLabels) || evaluate(cnf.flowchart.htmlLabels);
for (const className in classes) {
if (cnf.htmlLabels || cnf.flowchart.htmlLabels) {
if (htmlLabels) {
userStyles += `\n.${className} > * { ${classes[className].styles.join(
' !important; '
)} !important; }`;
@@ -306,7 +308,6 @@ const render = function(id, _txt, cb, container) {
' !important; '
)} !important; }`;
} else {
// console.log('classes[className].styles', classes[className].styles, cnf.htmlLabels);
userStyles += `\n.${className} path { ${classes[className].styles.join(
' !important; '
)} !important; }`;