Updatable Edge

Updatable Edge

An edge is updatable by dragging it to another handle if you are using the onEdgeUpdate handler prop. The handler gets called after the edge gets dropped to a new handle. You can use the updateEdge 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 edgesUpdatable is set to true.

  • For edges to actually be draggable, though, it is also necessary to define a onEdgeUpdate handler.

  • Individual edges can refine or override the edgesUpdatable prop by setting their updatable property.

    • true means the edge is updatable even if edgesUpdatable

    • "source" or "target" means the edge is updatable only from the source or target handle regardless of the edgesUpdatable prop.

    • false means the edge is not updatable even if edgesUpdatable is set to true.