Merge pull request #5063 from bonyuta0204/bug/4736_zero_size_image_flowchart

fix: flowchart image without text
This commit is contained in:
Sidharth Vinod
2023-11-27 08:28:48 +00:00
committed by GitHub

View File

@@ -80,7 +80,9 @@ export const labelHelper = async (parent, node, _classes, isNode) => {
? getConfig().fontSize
: window.getComputedStyle(document.body).fontSize;
const enlargingFactor = 5;
img.style.width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';
const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';
img.style.minWidth = width;
img.style.maxWidth = width;
} else {
img.style.width = '100%';
}