From 5a608aa37c3113db286cc7d3c06147c175249325 Mon Sep 17 00:00:00 2001 From: Jairo Correa Date: Mon, 16 Oct 2023 17:29:23 -0300 Subject: [PATCH] Fix node getBounding for collapsed nodes --- web/lib/litegraph.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/litegraph.core.js b/web/lib/litegraph.core.js index f81c83a8..e906590f 100644 --- a/web/lib/litegraph.core.js +++ b/web/lib/litegraph.core.js @@ -3796,7 +3796,7 @@ out = out || new Float32Array(4); out[0] = this.pos[0] - 4; out[1] = this.pos[1] - LiteGraph.NODE_TITLE_HEIGHT; - out[2] = this.size[0] + 4; + out[2] = this.flags.collapsed ? (this._collapsed_width || LiteGraph.NODE_COLLAPSED_WIDTH) : this.size[0] + 4; out[3] = this.flags.collapsed ? LiteGraph.NODE_TITLE_HEIGHT : this.size[1] + LiteGraph.NODE_TITLE_HEIGHT; if (this.onBounding) {