Autoscroll while dragging nodes or connecting links?

Is there a way to get a goJS Diagram to autoscroll when you are doing a drag gesture? I have a problem where I’m trying to connect two nodes together using the relink tool, and I can’t get the diagram to scroll while dragging the link to access a node outside the current boundaries of the view.

Turns out autoscrolling is working, but it’s very very sensitive to when it will happen. I’m noticing the node or link end has to be exactly on the border of the view before it happens. If you drag it past the border it doesn’t… which doesn’t seem right to me. Is there a way to make it more responsive to the boundary? I would really like it to happen if you go beyond the boundary for sure…


If you want to increase the margin where autoscrolling happens, set Diagram.autoScrollRegion.

That did help, but there’s one behavior that’s fairly annoying. If you drag a node outside the bounds of the graph, it doesn’t autoscroll. It will only autoscroll if the boundaries of the node touch the boundaries of the “autoScrollRegion”. Is there a way I can get the diagram to autoscroll if you drag the item outside the bounds?


There’s no built-in way, sorry. We treat the mouse leaving the diagram differently.