Change class member height to use own BBox

This commit is contained in:
Ibrahim Wassouf 2023-07-11 19:39:39 -03:00
parent 0a493c79ff
commit d2ab132a18
1 changed files with 5 additions and 2 deletions

View File

@ -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