Add Scroll Bar using gojs

Hi ,

Currently i was struck in Horizontal Sliding on forms, i had used following code

myDiagram =
$(go.Diagram, “myDiagramDiv”,
{
// have mouse wheel events zoom in and out instead of scroll up and down
“toolManager.mouseWheelBehavior”: go.ToolManager.WheelZoom,

But its not taking affect ,please find below screen-shots for refrence

If the viewport is large enough to show the contents of the diagram and if the contents (occupying the Diagram.documentBounds) are within the viewport, you will not see a scrollbar because no scrollbar is needed. I’m assuming that in your screenshot there aren’t any other nodes besides the two that we can see.

On some browsers/platforms you might not see a scrollbar even when the scrollbar is actually there and usable, until you start scrolling. That’s beyond our control.

http://gojs.net/latest/intro/viewport.html
http://gojs.net/latest/intro/initialView.html

1 Like

Thanks, make sense now