mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-07 14:09:59 +00:00
Fix render issues after moving floating input links (#841)
- Fixes floating inputs have invisible segment after moving - Fixes floating input can be moved onto existing input link, resulting in the slot having two links
This commit is contained in:
@@ -96,12 +96,12 @@ export class FloatingRenderLink implements RenderLink {
|
||||
this.fromPos = fromReroute.pos
|
||||
}
|
||||
|
||||
canConnectToInput(): true {
|
||||
return true
|
||||
canConnectToInput(): boolean {
|
||||
return this.toType === "input"
|
||||
}
|
||||
|
||||
canConnectToOutput(): true {
|
||||
return true
|
||||
canConnectToOutput(): boolean {
|
||||
return this.toType === "output"
|
||||
}
|
||||
|
||||
canConnectToReroute(reroute: Reroute): boolean {
|
||||
@@ -118,6 +118,8 @@ export class FloatingRenderLink implements RenderLink {
|
||||
floatingLink.target_id = node.id
|
||||
floatingLink.target_slot = node.inputs.indexOf(input)
|
||||
|
||||
node.disconnectInput(node.inputs.indexOf(input))
|
||||
|
||||
this.fromSlot._floatingLinks?.delete(floatingLink)
|
||||
input._floatingLinks ??= new Set()
|
||||
input._floatingLinks.add(floatingLink)
|
||||
|
||||
@@ -622,6 +622,7 @@ export class LinkConnector {
|
||||
|
||||
for (const link of outputLinks) delete link._dragging
|
||||
for (const link of inputLinks) delete link._dragging
|
||||
for (const link of floatingLinks) delete link._dragging
|
||||
for (const reroute of hiddenReroutes) delete reroute._dragging
|
||||
|
||||
renderLinks.length = 0
|
||||
|
||||
Reference in New Issue
Block a user