remove magic value

Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
This commit is contained in:
Shahir Ahmed
2025-02-21 17:35:32 -05:00
parent a318ea3692
commit 50816a7f98

View File

@@ -44,7 +44,7 @@ function drawActorLegend(diagram) {
const textElement = svgDraw.drawText(diagram, labelData);
const textLength = textElement.node().getBBox().width;
if (textLength > maxWidth && textLength > conf?.leftMargin) {
if (textLength > maxWidth && textLength > conf?.leftMargin - textLength) {
maxWidth = textLength;
}
yPos += 20;