Disable a touch pad behavior

I’m now using mac to develop a gojs application. Notice that I can use touch pad with two fingers to move the viewport on the diagram. Seems like it’s a default feature. Is there a way to disable it?

I think you can disable that behavior by disabling the PanningTool. In your Diagram initialization:

  $(go.Diagram, . . . , {
        . . .,
        "panningTool.isEnabled": false

It doesn’t work for my diagram. This is my diagram initialization:

$(go.Diagram, gojsElement,
                initialContentAlignment: go.Spot.Center,
                initialAutoScale: go.Diagram.UniformToFill,

                minScale: 1,
                maxScale: 500,
                allowHorizontalScroll: true,
                allowVerticalScroll: true,
                "undoManager.isEnabled": true,
                // "toolManager.mouseWheelBehavior": go.ToolManager.WheelZoom,
                "toolManager.hoverDelay": 1000,

                hasHorizontalScrollbar: false,
                hasVerticalScrollbar: false,
                "animationManager.isEnabled": false,
                allowClipboard: false,
                allowDelete: false,
                "panningTool.isEnabled": false

@walter Setting it to false for panningTool seems like only disabled mouse clicking and dragging viewport but it doesn’t disable double finger on touch pad for dragging the viewport.

Did you want to prevent panning using the mouse?

We’ll look into it.

@walter I think I solved the problem. So on mac computers, double fingers on touch pad seems like equals to mouse wheel scroll behavior. I just set "toolManager.mouseWheelBehavior": go.ToolManager.WheelNone, and it’s working. Thanks anyways!

Yes, Macs emit wheel events on two finger pans to the Trackpad, so disabling wheel behavior is correct.

(Just be sure that’s what all your own customers/users want.)