Update packages/mermaid/src/dagre-wrapper/nodes.js

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
This commit is contained in:
Ibrahim Wassouf 2023-07-13 15:57:58 -03:00 committed by GitHub
parent aeba7a1d0e
commit e9f032cceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -937,8 +937,8 @@ const class_box = (parent, node) => {
'transform',
'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'
);
const methodBBox = lbl ? lbl.getBBox() : null;
verticalPos += (methodBBox.height ?? 0) + rowPadding;
const memberBBox = lbl?.getBBox();
verticalPos += (memberBBox?.height ?? 0) + rowPadding;
});
rect