jerosoler / Drawflow

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

change node position dynamically based on data change #656

Open Sri-5555 opened 1 year ago

Sri-5555 commented 1 year ago

Hi @jerosoler,

I need to change(reorder) the position and connection of the nodes, dynamically

Initially I have dragged and connection the nodes as below

Initial node

I need to change(reorder) the node positions as below example changed node

Is there any way to change(reorder) the nodes, in same position without deleting

jerosoler commented 1 year ago

Hi,

It could be done with a combination of things.

The methods: getNodeFromId, addConnection, removeSingleConnection.

And this method to move a node:

Sri-5555 commented 1 year ago

Thanks @jerosoler