mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 14:27:40 +00:00
[Cleanup] Remove unused code (#913)
This commit is contained in:
@@ -258,7 +258,11 @@ export class Reroute implements Positionable, LinkSegment, Serialisable<Serialis
|
||||
?.findNextReroute(withParentId, visited)
|
||||
}
|
||||
|
||||
findSourceOutput(): { node: LGraphNode, output: INodeOutputSlot, outputIndex: number, link: LLink } | undefined {
|
||||
/**
|
||||
* Finds the output node and output slot of the first link passing through this reroute.
|
||||
* @returns The output node and output slot of the first link passing through this reroute, or `undefined` if no link is found.
|
||||
*/
|
||||
findSourceOutput(): { node: LGraphNode, output: INodeOutputSlot } | undefined {
|
||||
const link = this.firstLink ?? this.firstFloatingLink
|
||||
if (!link) return
|
||||
|
||||
@@ -268,22 +272,20 @@ export class Reroute implements Positionable, LinkSegment, Serialisable<Serialis
|
||||
return {
|
||||
node,
|
||||
output: node.outputs[link.origin_slot],
|
||||
outputIndex: link.origin_slot,
|
||||
link,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the inputs and nodes for links or floating links passing through this reroute.
|
||||
* Finds the inputs and nodes of (floating) links passing through this reroute.
|
||||
* @returns An array of objects containing the node and input slot of each link passing through this reroute.
|
||||
*/
|
||||
findTargetInputs(): { node: LGraphNode, input: INodeInputSlot, inputIndex: number, link: LLink }[] | undefined {
|
||||
findTargetInputs(): { node: LGraphNode, input: INodeInputSlot, link: LLink }[] | undefined {
|
||||
const network = this.#network.deref()
|
||||
if (!network) return
|
||||
|
||||
const results: {
|
||||
node: LGraphNode
|
||||
input: INodeInputSlot
|
||||
inputIndex: number
|
||||
link: LLink
|
||||
}[] = []
|
||||
|
||||
@@ -305,7 +307,7 @@ export class Reroute implements Positionable, LinkSegment, Serialisable<Serialis
|
||||
const input = node?.inputs[link.target_slot]
|
||||
if (!input) continue
|
||||
|
||||
results.push({ node, input, inputIndex: link.target_slot, link })
|
||||
results.push({ node, input, link })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user