Allow floating reroute switches (#862)

- Resolves https://github.com/Comfy-Org/ComfyUI_frontend/issues/3247

Bypasses the logic that automatically removed reroutes that had no
remaining links. Reroutes are now always converted to floating whenever
reroutes are reconnected.
This commit is contained in:
filtered
2025-03-28 05:18:22 +11:00
committed by GitHub
parent 332b18bd91
commit a20bae064f
2 changed files with 34 additions and 0 deletions

View File

@@ -65,6 +65,8 @@ export class ToInputRenderLink implements RenderLink {
// Set the parentId of the reroute we dropped on, to the reroute we dragged from
reroute.parentId = fromReroute?.id
// Keep reroutes when disconnecting the original link
existingLink.disconnect(this.network, "output")
const newLink = outputNode.connectSlots(fromSlot, inputNode, input, existingLink.parentId)
// Connecting from the final reroute of a floating reroute chain