Fix hangup with Show connections on Set/Get nodes

This commit is contained in:
kijai 2024-12-25 13:17:03 +02:00
parent 7a190ce8c1
commit 4c5c26a2c9

View File

@ -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,
@ -528,6 +530,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 = [
@ -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