mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 17:54:14 +00:00
Fix regression: shift-drag new link from link line (#814)
- Resolves #375 - Resolves https://github.com/Comfy-Org/ComfyUI_frontend/issues/2941
This commit is contained in:
@@ -11,7 +11,6 @@ import { LiteGraph } from "@/litegraph"
|
||||
import { LLink } from "@/LLink"
|
||||
import { LinkDirection } from "@/types/globalEnums"
|
||||
|
||||
import { getNodeOutputOnPos } from "./measureSlots"
|
||||
import { MovingRenderLink } from "./MovingRenderLink"
|
||||
import { ToInputRenderLink } from "./ToInputRenderLink"
|
||||
import { ToOutputRenderLink } from "./ToOutputRenderLink"
|
||||
@@ -246,10 +245,10 @@ export class LinkConnector {
|
||||
const node = network.getNodeById(linkSegment.origin_id)
|
||||
if (!node) return
|
||||
|
||||
const slot = getNodeOutputOnPos(node, linkSegment._pos[0], linkSegment._pos[1])?.output
|
||||
const slot = node.outputs.at(linkSegment.origin_slot)
|
||||
if (!slot) return
|
||||
|
||||
const reroute = linkSegment.parentId ? network.reroutes.get(linkSegment.parentId) : undefined
|
||||
const reroute = network.getReroute(linkSegment.parentId)
|
||||
if (!reroute) return
|
||||
|
||||
const renderLink = new ToInputRenderLink(network, node, slot, reroute)
|
||||
@@ -257,6 +256,8 @@ export class LinkConnector {
|
||||
this.renderLinks.push(renderLink)
|
||||
|
||||
state.connectingTo = "input"
|
||||
|
||||
this.#setLegacyLinks(false)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user