mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 04:49:44 +02:00
remove magic value
Co-authored-by: Pranav Mishra <mishrap@dickinson.edu>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user