mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Compare commits
2 Commits
4915545429
...
fix/5646
Author | SHA1 | Date | |
---|---|---|---|
![]() |
590784221a | ||
![]() |
46d612d135 |
@@ -104,6 +104,7 @@ export const labelHelper = async (parent, node, _classes, isNode) => {
|
||||
bbox = div.getBoundingClientRect();
|
||||
dv.attr('width', bbox.width);
|
||||
dv.attr('height', bbox.height);
|
||||
dv.style('height', bbox.height + 'px');
|
||||
}
|
||||
|
||||
// Center the label
|
||||
|
@@ -40,11 +40,14 @@ function addHtmlSpan(element, node, width, classes, addBackground = false) {
|
||||
div.style('display', 'table');
|
||||
div.style('white-space', 'break-spaces');
|
||||
div.style('width', width + 'px');
|
||||
bbox = div.node().getBoundingClientRect();
|
||||
const newBbox = div.node().getBoundingClientRect();
|
||||
if (newBbox.height > 0) {
|
||||
bbox = newBbox;
|
||||
}
|
||||
}
|
||||
|
||||
fo.style('width', bbox.width);
|
||||
fo.style('height', bbox.height);
|
||||
fo.style('width', bbox.width + 'px');
|
||||
fo.style('height', bbox.height + 'px');
|
||||
|
||||
return fo.node();
|
||||
}
|
||||
|
Reference in New Issue
Block a user