Compare commits

...

2 Commits

Author SHA1 Message Date
Yash Singh
590784221a rm + in package.json 2024-07-16 18:43:33 -07:00
Yash Singh
46d612d135 fix: long strings in firefox 2024-07-16 18:41:45 -07:00
2 changed files with 7 additions and 3 deletions

View File

@@ -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

View File

@@ -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();
}