Change useHtmlLabels to use general config's htmlLabels attribute not flowchart's

This commit is contained in:
yari-dewalt
2024-10-29 11:55:34 -07:00
parent fe8932e906
commit 8f0e0b9c39

View File

@@ -13,7 +13,7 @@ export const labelHelper = async <T extends SVGGraphicsElement>(
_classes?: string
) => {
let cssClasses;
const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.flowchart?.htmlLabels);
const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.htmlLabels);
if (!_classes) {
cssClasses = 'node default';
} else {
@@ -52,7 +52,7 @@ export const labelHelper = async <T extends SVGGraphicsElement>(
let bbox = text.getBBox();
const halfPadding = (node?.padding ?? 0) / 2;
if (evaluate(getConfig().flowchart?.htmlLabels)) {
if (useHtmlLabels) {
const div = text.children[0];
const dv = select(text);