Type alias: ValidConnectionFunc ​
Ƭ ValidConnectionFunc: (connection
: Connection
, elements
: { edges
: GraphEdge
[] ; nodes
: GraphNode
[] ; sourceNode
: GraphNode
; targetNode
: GraphNode
}) => boolean
Type declaration ​
â–¸ (connection
, elements
): boolean
A valid connection function can determine if an attempted connection is valid or not, i.e. abort creating a new edge
Parameters ​
Name | Type |
---|---|
connection | Connection |
elements | Object |
elements.edges | GraphEdge [] |
elements.nodes | GraphNode [] |
elements.sourceNode | GraphNode |
elements.targetNode | GraphNode |
Returns ​
boolean