mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-11 01:28:03 +00:00
refactor!: delete the input.link runtime mirror
The linkStore is now the single source for slot connectivity in both directions. The NodeInputSlot.link field and all runtime write sites are gone; a read-only prototype getter derives the id from the store and fires warnDeprecated as extension migration telemetry (no setter, so writes throw). Wire format unchanged: serialization derives inputs[].link from the store. The mirror-carried association machinery is reworked rather than papered over: fixLinkInputSlots consumes the serialized graph data (where node.configure reorders inputs in place), dynamicWidgets' group rebuilds carry slot-to-link association in a WeakMap refreshed from the store, reorderSubgraphInputs captures outer links by pre-reorder index, and link deduplication selects survivors from the store registration - repairInputLinks is deleted because the derived view cannot be inconsistent. Extension migration: read via node.isInputConnected(slot) / node.getInputLink(slot); mutate via node.connect() / node.disconnectInput().
This commit is contained in:
@@ -51,8 +51,6 @@ function transferInputConnection(
|
||||
|
||||
link.target_id = newNode.id
|
||||
link.target_slot = newSlotIdx
|
||||
newNode.inputs[newSlotIdx].link = linkId
|
||||
oldNode.inputs[oldSlotIdx].link = null
|
||||
}
|
||||
|
||||
function transferOutputConnections(
|
||||
|
||||
Reference in New Issue
Block a user