Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Drag scroll

$
0
0

@Dor wrote:

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles