From 75bf1367979cb6098aeb458c1673e6362cfc60f0 Mon Sep 17 00:00:00 2001 From: kdb621 Date: Thu, 20 May 2021 13:26:58 +0900 Subject: [PATCH] Fix Boundary and collapsed issue * If you collapse a node with a widget after loading the graph, it cannot be expanded. * Compute Collapsed Nodes boundary is incorrect --- src/litegraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litegraph.js b/src/litegraph.js index 47e002625e..13b08fdae4 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -3499,7 +3499,7 @@ out[0] = this.pos[0] - 4; out[1] = this.pos[1] - LiteGraph.NODE_TITLE_HEIGHT; out[2] = this.size[0] + 4; - out[3] = this.size[1] + LiteGraph.NODE_TITLE_HEIGHT; + out[3] = this.flags.collapsed ? LiteGraph.NODE_TITLE_HEIGHT : this.size[1] + LiteGraph.NODE_TITLE_HEIGHT; if (this.onBounding) { this.onBounding(out); @@ -8842,7 +8842,7 @@ LGraphNode.prototype.executeAction = function(action) var widget_width = w.width || width; //outside if ( w != active_widget && - (x < 6 || x > widget_width - 12 || y < w.last_y || y > w.last_y + widget_height) ) + (x < 6 || x > widget_width - 12 || y < w.last_y || y > w.last_y + widget_height || w.last_y === undefined) ) continue; var old_value = w.value;