How to disable autoscroll when moving nodes?

Hi,

If a diagram is too large to be shown entirely, and if a user moves a node which makes the diagram smaller,
the diagram is automatically repositioned such that a larger area of the diagram is shown.

How can I control this behaviour? In fact, I want to disable this behaviour at all.

To reproduce the behaviour:

  • Take the “minimal” example of your website.
  • Move the “delta” node some what to the right
  • Zoom in such that the diagram both the “alpha” and “delta” are partially outside the viewport…
  • Move the “delta” node to the left such that it is fully inside the viewport again.
  • Now watch the diagram moving to the right.

Cheers,

-Paul.

Try setting Diagram.scrollMode to Diagram.InfiniteScroll. This is a new feature in version 1.5.

See also http://gojs.net/latest/samples/scrollModes.html

By the way, what you are talking about is not called “autoscrolling”. Autoscrolling is when you are dragging a node near the edge of the viewport and there are timer events to cause the diagram to be scrolled in the opposite direction, effectively moving the selection farther away from the rest of the diagram contents. http://gojs.net/latest/api/symbols/diagram.html#autoScrollRegion