From cf42d57cf50c19c0b87f2cc94191ceb2a3ed9664 Mon Sep 17 00:00:00 2001 From: Codes4Fun Date: Sat, 20 Jun 2026 07:43:23 -0700 Subject: [PATCH] fix link direction for widget slots. --- web/comfyui/loom.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/comfyui/loom.js b/web/comfyui/loom.js index 5bc4459..a38c215 100644 --- a/web/comfyui/loom.js +++ b/web/comfyui/loom.js @@ -106,12 +106,15 @@ function getLinkTargetSlot(graph, link) { function getSlotPos(slot, isInput) { // sugraph io has pos - if (slot.pos) + if (!slot.node) return slot.pos; // we don't have access to slot pos stores, so simple calculation const node = slot.node; let x = node.pos[0]; let y = node.pos[1]; + if (!node.flags?.collapsed && slot.pos) { + return [x+slot.pos[0],y+slot.pos[1]]; + } if (node.flags?.collapsed) { y -= LiteGraph.NODE_TITLE_HEIGHT; }