MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / resolveSubgraphInputLinks

Method resolveSubgraphInputLinks

src/subgraph/SubgraphNode.ts:291–299  ·  view source on GitHub ↗

* Finds the internal links connected to the given input slot inside the subgraph, and resolves the nodes / slots. * @param slot The slot index * @returns The resolved connections, or undefined if no input node is found. * @remarks This is used to resolve the input links when dragging a link

(slot: number)

Source from the content-addressed store, hash-verified

289 * @remarks This is used to resolve the input links when dragging a link from a subgraph input slot.
290 */
291 resolveSubgraphInputLinks(slot: number): ResolvedConnection[] {
292 const inputSlot = this.subgraph.inputNode.slots[slot]
293 const innerLinks = inputSlot.getLinks()
294 if (innerLinks.length === 0) {
295 console.debug(`[SubgraphNode.resolveSubgraphInputLinks] No inner links found for input slot [${slot}] ${inputSlot.name}`, this)
296 return []
297 }
298 return innerLinks.map(link => link.resolve(this.subgraph))
299 }
300
301 /**
302 * Finds the internal link connected to the given output slot inside the subgraph, and resolves the nodes / slots.

Callers 1

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected