Hi,
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()
});