Skip to content

Commit

Permalink
Merge pull request #5063 from bonyuta0204/bug/4736_zero_size_image_fl…
Browse files Browse the repository at this point in the history
…owchart

fix: flowchart image without text
  • Loading branch information
sidharthv96 committed Nov 27, 2023
2 parents 62b991b + 1ff7218 commit 7ca76b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/mermaid/src/dagre-wrapper/shapes/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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%';
}
Expand Down

0 comments on commit 7ca76b0

Please sign in to comment.