mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-23 03:34:30 +08:00
Update jsnodes.js
This commit is contained in:
parent
501c1df1bc
commit
0920c127be
@ -174,9 +174,12 @@ app.registerExtension({
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
async setup() {
|
||||||
// to keep Set/Get node virtual connections visible when offscreen
|
// to keep Set/Get node virtual connections visible when offscreen
|
||||||
const originalComputeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes;
|
const originalComputeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes;
|
||||||
LGraphCanvas.prototype.computeVisibleNodes = function (nodes, out) {
|
LGraphCanvas.prototype.computeVisibleNodes = function () {
|
||||||
const visibleNodesSet = new Set(originalComputeVisibleNodes.apply(this, arguments));
|
const visibleNodesSet = new Set(originalComputeVisibleNodes.apply(this, arguments));
|
||||||
for (const node of this.graph._nodes) {
|
for (const node of this.graph._nodes) {
|
||||||
if ((node.type === "SetNode" || node.type === "GetNode") && node.drawConnection) {
|
if ((node.type === "SetNode" || node.type === "GetNode") && node.drawConnection) {
|
||||||
@ -185,5 +188,6 @@ app.registerExtension({
|
|||||||
}
|
}
|
||||||
return Array.from(visibleNodesSet);
|
return Array.from(visibleNodesSet);
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user