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

Method bypassAllLinks

src/LGraphNode.ts:3512–3530  ·  view source on GitHub ↗
(output: INodeOutputSlot, inNode: LGraphNode, inLink: LLink, graph: LGraph)

Source from the content-addressed store, hash-verified

3510 return madeAnyConnections
3511
3512 function bypassAllLinks(output: INodeOutputSlot, inNode: LGraphNode, inLink: LLink, graph: LGraph) {
3513 const outLinks = output.links
3514 ?.map(x => _links.get(x))
3515 .filter(x => !!x)
3516 if (!outLinks?.length) return
3517
3518 for (const outLink of outLinks) {
3519 const outNode = graph.getNodeById(outLink.target_id)
3520 if (!outNode) continue
3521
3522 const result = inNode.connect(
3523 inLink.origin_slot,
3524 outNode,
3525 outLink.target_slot,
3526 inLink.parentId,
3527 )
3528 madeAnyConnections ||= !!result
3529 }
3530 }
3531 }
3532
3533 /**

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
getNodeByIdMethod · 0.65
connectMethod · 0.45

Tested by

no test coverage detected