mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-09 21:04:41 +08:00
Fix hangup with Show connections on Set/Get nodes
This commit is contained in:
parent
7a190ce8c1
commit
4c5c26a2c9
@ -327,6 +327,8 @@ app.registerExtension({
|
|||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
// Provide a default link object with necessary properties, to avoid errors as link can't be null anymore
|
||||||
|
const defaultLink = { type: 'default', color: this.slotColor };
|
||||||
|
|
||||||
for (const getter of this.currentGetters) {
|
for (const getter of this.currentGetters) {
|
||||||
if (!this.flags.collapsed) {
|
if (!this.flags.collapsed) {
|
||||||
@ -347,7 +349,7 @@ app.registerExtension({
|
|||||||
ctx,
|
ctx,
|
||||||
start_node_slotpos,
|
start_node_slotpos,
|
||||||
end_node_slotpos,
|
end_node_slotpos,
|
||||||
null,
|
defaultLink,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
this.slotColor,
|
this.slotColor,
|
||||||
@ -529,6 +531,9 @@ app.registerExtension({
|
|||||||
_drawVirtualLink(lGraphCanvas, ctx) {
|
_drawVirtualLink(lGraphCanvas, ctx) {
|
||||||
if (!this.currentSetter) return;
|
if (!this.currentSetter) return;
|
||||||
|
|
||||||
|
// Provide a default link object with necessary properties, to avoid errors as link can't be null anymore
|
||||||
|
const defaultLink = { type: 'default', color: this.slotColor };
|
||||||
|
|
||||||
let start_node_slotpos = this.currentSetter.getConnectionPos(false, 0);
|
let start_node_slotpos = this.currentSetter.getConnectionPos(false, 0);
|
||||||
start_node_slotpos = [
|
start_node_slotpos = [
|
||||||
start_node_slotpos[0] - this.pos[0],
|
start_node_slotpos[0] - this.pos[0],
|
||||||
@ -539,7 +544,7 @@ app.registerExtension({
|
|||||||
ctx,
|
ctx,
|
||||||
start_node_slotpos,
|
start_node_slotpos,
|
||||||
end_node_slotpos,
|
end_node_slotpos,
|
||||||
null,
|
defaultLink,
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
this.slotColor
|
this.slotColor
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user