mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-14 15:24:34 +08:00
Update jsnodes.js
This commit is contained in:
parent
b4480e0ccc
commit
460902fdce
@ -131,5 +131,17 @@ app.registerExtension({
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// to keep Set/Get node virtual connections visible when offscreen
|
||||||
|
const originalComputeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes;
|
||||||
|
LGraphCanvas.prototype.computeVisibleNodes = function (nodes, out) {
|
||||||
|
const visibleNodes = originalComputeVisibleNodes.apply(this, arguments);
|
||||||
|
const setAndGetNodes = this.graph._nodes.filter(node => node.type === "SetNode" || node.type === "GetNode");
|
||||||
|
for (const node of setAndGetNodes) {
|
||||||
|
if (!visibleNodes.includes(node) && node.drawConnection) {
|
||||||
|
visibleNodes.push(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return visibleNodes;
|
||||||
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user