Skip to content

Autoswitch handles for edges #631

Answered by bcakmakoglu
shsmad asked this question in Q&A
Discussion options

You must be logged in to vote

Mh... I haven't tried this yet, but I would assume

  1. You want to listen to onNodeDrag so you can calculate the closest handle when a node's position changes
  2. You want to change edge.sourceHandle or edge.targetHandle when there is a new closest handle.

The edge should be redrawn, whenever you change sourceHandle or targetHandle.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shsmad
Comment options

Answer selected by shsmad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants