mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 09:20:03 +02:00
Change class member height to use own BBox
This commit is contained in:
@@ -917,7 +917,9 @@ const class_box = (parent, node) => {
|
||||
((-1 * maxHeight) / 2 + verticalPos + lineHeight / 2) +
|
||||
')'
|
||||
);
|
||||
verticalPos += classTitleBBox.height + rowPadding;
|
||||
//get the height of the bounding box of each member if exists
|
||||
const memberBBox = lbl ? lbl.getBBox() : null;
|
||||
verticalPos += (memberBBox.height ?? 0) + rowPadding;
|
||||
});
|
||||
|
||||
verticalPos += lineHeight;
|
||||
@@ -935,7 +937,8 @@ const class_box = (parent, node) => {
|
||||
'transform',
|
||||
'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'
|
||||
);
|
||||
verticalPos += classTitleBBox.height + rowPadding;
|
||||
const methodBBox = lbl ? lbl.getBBox() : null;
|
||||
verticalPos += (methodBBox.height ?? 0) + rowPadding;
|
||||
});
|
||||
|
||||
rect
|
||||
|
Reference in New Issue
Block a user