Drag scroll


How can I implement a drag scroll? (same as in google maps, should scroll on drag and change the mouse cursor)
The diagram is set to readOnly (I would like to keep it that way) and I’m allowing scroll (vertical/horizontal) only when there are visible scroll bars (DocumentView contains DocumentBounds)

myDiagram =
  $(go.Diagram, "myDiagramDiv",  // must name or refer to the DIV HTML element
        initialContentAlignment: go.Spot.Top,
        allowDrop: true,
        "animationManager.isEnabled": false,
        "undoManager.isEnabled": false,
        isReadOnly: true,
        allowSelect: false,
        maxScale: 1.5,
        minScale: 0.5,
        "BackgroundSingleClicked" : handleBackgroundClick,
        "InitialLayoutCompleted": onInitialComplete,
        "ViewportBoundsChanged": () => setDiagramScroll(),
        "DocumentBoundsChanged": () => setDiagramScroll()

I believe you are talking about “panning”.
The PanningTool is enabled when the Diagram.isReadOnly, so my guess is that your setDiagramScroll function is causing that behavior.

Didn’t noticed that my panning tool was disabled.