Skip to content

@eightkk/vue-weave / core / graphConnectionTargets

Function: graphConnectionTargets() ​

graphConnectionTargets(nodes, edges, rules, origin, replacingEdgeId?): GraphConnectionTargets

Defined in: src/core/graphPortRules.ts:305

The valid targets of a connection in progress from origin, in one pass over the nodes after indexing the edges once: every port, and every node without ports, that checkGraphConnection would accept as the other end. A node with ports is a target only through its ports. Self-connections are included when the rules allow them. With replacingEdgeId (a reconnection), that edge is left out of the counts. An unknown origin has no targets.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

rules ​

GraphPortRules

origin ​

GraphConnectionOrigin

replacingEdgeId? ​

string

Returns ​

GraphConnectionTargets

Released under the MIT License.