This example shows how to keep drag interactions moving when the pointer reaches the edge of f-flow. Instead of forcing users to drop, pan manually, and start over, the viewport continues to scroll while the drag session stays active.
The demo enables auto-pan through <f-auto-pan /> and combines the supported drag kinds in one place: connection creation, connection reassignment, node dragging, and selection area.
[example.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/libs/f-examples/extensions/auto-pan/example.html [example.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/libs/f-examples/extensions/auto-pan/example.ts [example.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/libs/f-examples/extensions/auto-pan/example.scss
Shift and extend the selection rectangle until it reaches the off-screen node.<f-auto-pan /> on and off with the checkbox in the toolbar.fEdgeThreshold, fSpeed, and fAcceleration in the toolbar.