mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-09 21:04:41 +08:00
Update jsnodes.js
This commit is contained in:
parent
b4480e0ccc
commit
460902fdce
@ -130,6 +130,18 @@ app.registerExtension({
|
||||
};
|
||||
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