Reconnect Edge
An edge is reconnectable by dragging it to another handle if you are using the
onReconnect handler prop. The handler gets
called after the edge gets dropped to a new handle. You can use the
reconnectEdge helper function to update your
edges state accordingly.
A couple of properties interact with one another to determine whether an edge is updatable or not:
-
By default the
edgesReconnectableis set totrue. -
For edges to actually be draggable, though, it is also necessary to define a
onReconnecthandler. -
Individual edges can refine or override the
edgesReconnectableprop by setting theirupdatableproperty.-
truemeans the edge is updatable even ifedgesReconnectable -
"source"or"target"means the edge is updatable only from the source or target handle regardless of theedgesReconnectableprop. -
falsemeans the edge is not updatable even ifedgesReconnectableis set totrue.
-