jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.65k stars 722 forks source link

Is it possible to limit a specific node to drag within a specific region? #554

Open AnirudhWT opened 1 year ago

AnirudhWT commented 1 year ago

Capture

jerosoler commented 1 year ago

View:

AnirudhWT commented 1 year ago

Restricting node movement inside a section is the requirement . But solution you have suggested is for how to make a node inside a node .

jerosoler commented 1 year ago

You could limit the movement of the node by knowing the parent.

With the event "mouseMove" the movement can be limited.

In this example you can see how several nodes move at the same time with the mousemove event.