Closed Sri-5555 closed 1 year ago
By default there is nothing implemented. But what would have to be done is to detect the collisions.
https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection
You could use the events of "nodeCreated", "nodeMoved". To detect when a node is created or moved.
Once this is done, detect if there is a collision and if there is, move the node.
Move node with javascript:
Hi @jerosoler can you please help me that how can i get position of any node in drawflow when i move using (nodeMoved event) so i can manage collision detaction
Thanks
Use editor.export()
to gell all info.
Or document.querySelectorAll(".drawflow-node ");
and get left and top position
is there any sample code for this? could you please share it here
How to restrict overlap of node while dragging existing or adding new node over other node