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 24, 2023
1 parent 61747b6 commit 1ff7218
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 1ff7218

Please sign in to comment.