mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-16 18:54:12 +01: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 textElement = svgDraw.drawText(diagram, labelData);
|
||||||
const textLength = textElement.node().getBBox().width;
|
const textLength = textElement.node().getBBox().width;
|
||||||
if (textLength > maxWidth && textLength > conf?.leftMargin) {
|
if (textLength > maxWidth && textLength > conf?.leftMargin - textLength) {
|
||||||
maxWidth = textLength;
|
maxWidth = textLength;
|
||||||
}
|
}
|
||||||
yPos += 20;
|
yPos += 20;
|
||||||
|
|||||||
Reference in New Issue
Block a user