Skip to content

Commit 89e31ab

Browse files
committed
Fix clipping of collapsed nodes
1 parent 6ff06fa commit 89e31ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web/scripts/domWidget.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ function getClipPath(node, element, elRect) {
1717
const MARGIN = 7;
1818
const scale = app.canvas.ds.scale;
1919

20+
const bounding = selectedNode.getBounding();
2021
const intersection = intersect(
2122
{ x: elRect.x / scale, y: elRect.y / scale, width: elRect.width / scale, height: elRect.height / scale },
2223
{
2324
x: selectedNode.pos[0] + app.canvas.ds.offset[0] - MARGIN,
2425
y: selectedNode.pos[1] + app.canvas.ds.offset[1] - LiteGraph.NODE_TITLE_HEIGHT - MARGIN,
25-
width: selectedNode.size[0] + MARGIN + MARGIN,
26-
height: selectedNode.size[1] + LiteGraph.NODE_TITLE_HEIGHT + MARGIN + MARGIN,
26+
width: bounding[2] + MARGIN + MARGIN,
27+
height: bounding[3] + MARGIN + MARGIN,
2728
}
2829
);
2930

0 commit comments

Comments
 (0)