#1955 Fix for non htmlLabels

This commit is contained in:
Knut Sveidqvist 2021-03-23 21:13:52 +01:00
parent 84c9dd0dad
commit 1ae074d05f
1 changed files with 5 additions and 2 deletions

View File

@ -298,12 +298,15 @@ const render = function(id, _txt, cb, container) {
if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
const classes = flowRenderer.getClasses(txt);
for (const className in classes) {
if (cnf.htmlLabels) {
if (cnf.htmlLabels || cnf.flowchart.htmlLabels) {
userStyles += `\n.${className} > * { ${classes[className].styles.join(
' !important; '
)} !important; }`;
userStyles += `\n.${className} span { ${classes[className].styles.join(
' !important; '
)} !important; }`;
} else {
console.log('classes[className].styles', classes[className].styles, cnf.htmlLabels);
// console.log('classes[className].styles', classes[className].styles, cnf.htmlLabels);
userStyles += `\n.${className} rect { ${classes[className].styles.join(
' !important; '
)} !important; }`;