本文へ移動

@eightkk/vue-weave / core / graphDeletion

Function: graphDeletion() ​

graphDeletion(nodes, edges, nodeIds, edgeIds?): GraphDeletion

Defined in: src/core/graphEditing.ts:18

Normalizes a deletion: validates the graph and the requested IDs, adds every edge incident to a deleted node, removes duplicates and sorts both lists into input order. Unknown node or edge IDs throw an Error.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

nodeIds ​

Iterable<string>

edgeIds? ​

Iterable<string> = []

Returns ​

GraphDeletion

MIT ライセンスで公開しています。