From 0920c127be08598f0181d2369da42a4957d8747b Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:48:50 +0300 Subject: [PATCH] Update jsnodes.js --- web/js/jsnodes.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/js/jsnodes.js b/web/js/jsnodes.js index 906f26e..02fdc43 100644 --- a/web/js/jsnodes.js +++ b/web/js/jsnodes.js @@ -173,10 +173,13 @@ app.registerExtension({ }; break; - } + } + + }, + async setup() { // to keep Set/Get node virtual connections visible when offscreen const originalComputeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes; - LGraphCanvas.prototype.computeVisibleNodes = function (nodes, out) { + LGraphCanvas.prototype.computeVisibleNodes = function () { const visibleNodesSet = new Set(originalComputeVisibleNodes.apply(this, arguments)); for (const node of this.graph._nodes) { if ((node.type === "SetNode" || node.type === "GetNode") && node.drawConnection) { @@ -185,5 +188,6 @@ app.registerExtension({ } return Array.from(visibleNodesSet); }; - }, + + } }); \ No newline at end of file