OnBeforeReconnect
The OnBeforeReconnect type is a callback function that is called before an edge is
reconnected.
The callback receives the new edge (with the updated connection) and the original edge
being reconnected. You can return the new edge or a modified version of it. Returning
false, null, or undefined aborts the reconnection.
Aborting the reconnection restores the edge to its original state. To delete the edge
instead, call deleteElements to
remove it, then return null.
See the Reconnect Edge example for more information on how to implement edge reconnection.
type OnBeforeReconnect<EdgeType extends Edge = Edge> = (
newEdge: EdgeType,
oldEdge: EdgeType,
) => EdgeType | void | false | null;| Name | Type | Default |
|---|---|---|
newEdge | EdgeType | |
oldEdge | EdgeType |
false | void | EdgeType | nullLast updated on