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
edgesReconnectable
is set totrue
. -
For edges to actually be draggable, though, it is also necessary to define a
onReconnect
handler. -
Individual edges can refine or override the
edgesReconnectable
prop by setting theirupdatable
property.-
true
means the edge is updatable even ifedgesReconnectable
-
"source"
or"target"
means the edge is updatable only from the source or target handle regardless of theedgesReconnectable
prop. -
false
means the edge is not updatable even ifedgesReconnectable
is set totrue
.
-