Skip to content

Type alias: ValidConnectionFunc ​

Ƭ ValidConnectionFunc: (connection: Connection, elements: { edges: GraphEdge[] ; nodes: GraphNode[] ; sourceNode: GraphNode ; targetNode: GraphNode }) => boolean

A valid connection function can determine if an attempted connection is valid or not, i.e. abort creating a new edge

Type declaration ​

â–¸ (connection, elements): boolean

Parameters ​
NameType
connectionConnection
elementsObject
elements.edgesGraphEdge[]
elements.nodesGraphNode[]
elements.sourceNodeGraphNode
elements.targetNodeGraphNode
Returns ​

boolean

Released under the MIT License.