jerosoler / Drawflow

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

Move node after position update via javascript #112

Closed icchio closed 3 years ago

icchio commented 3 years ago

Hi, Thank you for the amazing work!!! really great! Is there a way to refresh the view after i change the position of a node via javascript. Thank you again.

jerosoler commented 3 years ago

Hello @icchio

Thanks!!! 🎉

Example with node id 7

editor.drawflow.drawflow.Home.data[7].pos_x = 70;
editor.drawflow.drawflow.Home.data[7].pos_y = 60;
document.getElementById("node-7").style.top = "70px";
document.getElementById("node-7").style.left = "60px";
editor.updateConnectionNodes("node-7");

Jero