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; }