fix: Fix bug that caused comments to be incorrectly positioned. (#8668)

This commit is contained in:
Aaron Dodson
2024-11-21 11:28:27 -08:00
committed by GitHub
parent 34b0b523e1
commit b73d6156a5

View File

@@ -338,8 +338,7 @@ export class CommentIcon extends Icon implements IHasBubble, ISerializable {
* I.E. the block that owns this icon.
*/
private getBubbleOwnerRect(): Rect {
const bbox = (this.sourceBlock as BlockSvg).getSvgRoot().getBBox();
return new Rect(bbox.y, bbox.y + bbox.height, bbox.x, bbox.x + bbox.width);
return (this.sourceBlock as BlockSvg).getBoundingRectangleWithoutChildren();
}
}