Skip to content

Commit

Permalink
fix: flowchart image without text
Browse files Browse the repository at this point in the history
  • Loading branch information
bonyuta0204 committed Nov 23, 2023
1 parent 4a4e614 commit 9b4e4ae
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 9b4e4ae

Please sign in to comment.