xyflow / xyflow

React Flow | Svelte Flow - Powerful open source libraries for building node-based UIs with React (https://reactflow.dev) or Svelte (https://svelteflow.dev). Ready out-of-the-box and infinitely customizable.
https://xyflow.com
MIT License
22.59k stars 1.49k forks source link

Add provision to control speed of panning of canvas while dragging the nodes #4376

Closed aman-observo closed 3 days ago

aman-observo commented 3 weeks ago

Problem facing: Currently when we drag the nodes to the boundaries of the viewport and autoPanOnNodeDrag is enabled, the pace of panning the canvas is very fast which sometimes leaves the content on the viewport illegible.

Feature request: We would like to manually control & configure the speed of this panning process of the viewport.

moklick commented 1 week ago

I agree! It's a hardcoded value that could be replaced by a autoPanSpeed for example.

moklick commented 1 week ago

In 12.0.0-next.26 we added an autoPanSpeed prop.

moklick commented 3 days ago

autoPanSpeed prop was released with React Flow 12! If you are using 11, you can find the migration guide here: https://reactflow.dev/learn/troubleshooting/migrate-to-v12