jerosoler / Drawflow

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

Center diagram based on Nodeid #541

Closed converseKarl closed 1 year ago

converseKarl commented 2 years ago

If i have a popup list of nodes, and choose one, how can i use this to centre the diagram with this node in the middle. Has anyone tried this because in a large diagram this scroll to or position centre feature would be very useful.

Any thoughts how to do this

jerosoler commented 2 years ago

You can get the coordinates of the node with getNodeFromId and use the following method.