mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 21:39:40 +02:00
#1955 Fix for non htmlLabels
This commit is contained in:
@@ -298,19 +298,20 @@ const render = function(id, _txt, cb, container) {
|
|||||||
if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
|
if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {
|
||||||
const classes = flowRenderer.getClasses(txt);
|
const classes = flowRenderer.getClasses(txt);
|
||||||
for (const className in classes) {
|
for (const className in classes) {
|
||||||
userStyles += `\n.${className} > * { ${classes[className].styles.join(
|
if (cnf.htmlLabels) {
|
||||||
' !important; '
|
userStyles += `\n.${className} span { ${classes[className].styles.join(
|
||||||
)} !important; }`;
|
|
||||||
userStyles += `\n.${className} span { ${classes[className].styles.join(
|
|
||||||
' !important; '
|
|
||||||
)} !important; }`;
|
|
||||||
userStyles += `\n.${className} tspan { ${classes[className].styles.join(
|
|
||||||
' !important; '
|
|
||||||
)} !important; }`;
|
|
||||||
if (classes[className].textStyles) {
|
|
||||||
userStyles += `\n.${className} tspan { ${classes[className].textStyles.join(
|
|
||||||
' !important; '
|
' !important; '
|
||||||
)} !important; }`;
|
)} !important; }`;
|
||||||
|
} else {
|
||||||
|
console.log('classes[className].styles', classes[className].styles, cnf.htmlLabels);
|
||||||
|
userStyles += `\n.${className} rect { ${classes[className].styles.join(
|
||||||
|
' !important; '
|
||||||
|
)} !important; }`;
|
||||||
|
if (classes[className].textStyles) {
|
||||||
|
userStyles += `\n.${className} tspan { ${classes[className].textStyles.join(
|
||||||
|
' !important; '
|
||||||
|
)} !important; }`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user