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

Method removeLink

src/LGraph.ts:1374–1382  ·  view source on GitHub ↗

* Destroys a link

(link_id: LinkId)

Source from the content-addressed store, hash-verified

1372 * Destroys a link
1373 */
1374 removeLink(link_id: LinkId): void {
1375 const link = this._links.get(link_id)
1376 if (!link) return
1377
1378 const node = this.getNodeById(link.target_id)
1379 node?.disconnectInput(link.target_slot, false)
1380
1381 link.disconnect(this)
1382 }
1383
1384 /**
1385 * Creates a new subgraph definition, and adds it to the graph.

Callers 4

inner_clickedMethod · 0.45
connectToRerouteInputMethod · 0.45
connectToRerouteInputMethod · 0.45
disconnectFunction · 0.45

Calls 4

getNodeByIdMethod · 0.95
getMethod · 0.80
disconnectInputMethod · 0.80
disconnectMethod · 0.45

Tested by

no test coverage detected