question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GestureSettings are ignored

See original GitHub issue

I’m trying to disable pinch-zooming on our OSD viewer and running into some trouble.

Here’s how I’m setting pinchToZoom to false:


viewer = new OpenSeadragon.Viewer({
            ....
            immediateRender: false,
            animationTime: 1.5,
            tileSources: dzc_file,
            gestureSettingsMouse:   { scrollToZoom: true,  clickToZoom: true,  dblClickToZoom: false, pinchToZoom: false,  flickEnabled: true, flickMinSpeed: 120, flickMomentum: 0.25, pinchRotate: false, dragToPan: true },
            gestureSettingsTouch:   { scrollToZoom: false, clickToZoom: true, dblClickToZoom: false,  pinchToZoom: false,  flickEnabled: true,  flickMinSpeed: 120, flickMomentum: 0.25, pinchRotate: false, dragToPan: true },
            gestureSettingsPen:     { scrollToZoom: false, clickToZoom: true,  dblClickToZoom: false, pinchToZoom: false,  flickEnabled: true, flickMinSpeed: 120, flickMomentum: 0.25, pinchRotate: false, dragToPan: true },
            gestureSettingsUnknown: { scrollToZoom: false, clickToZoom: true, dblClickToZoom: false, pinchToZoom: false,   flickEnabled: true,  flickMinSpeed: 120, flickMomentum: 0.25, pinchRotate: false, dragToPan: true }
        });

But this isn’t having any effect. Im still able to pinch zoom in any browser or device. Am I misunderstanding how I’m meant implement these options?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jj2883commented, Jun 15, 2020

@iangilman

The issue was fixed when I used a different example .dzi file.

I think it has to do with levels of the .dzi file, but I am not sure.

1reaction
iangilmancommented, Jun 15, 2020

I’ve just verified that it’s working for me on the latest OSD (on iOS Safari) with both of the techniques listed above:

gestureSettingsTouch:   { scrollToZoom: false, clickToZoom: true, dblClickToZoom: false,  pinchToZoom: false,  flickEnabled: true,  flickMinSpeed: 120, flickMomentum: 0.25, pinchRotate: false, dragToPan: true },

…or:

viewer.gestureSettingsTouch.pinchToZoom = false;

There must be some other issue at play. Can you share a repro (in CodePen or something like that) to show how you are getting the problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 7 Ways to Fix Gestures Not Working on Android
Top 7 Ways to Fix Gestures Not Working on Android ; Step 1: Open the Settings app on your phone and navigate to...
Read more >
Touchpad gestures not working in windows 10
Click on "Settings". From here, there is the "ease of access". There is the "mouse" field here (which offers different buttons than the...
Read more >
How to Fix Touchpad Gestures not working on Windows 11?
... you will see fixes for Windows 11 touchpad gestures not working. ... of your Touchpad 0:51 Check your Touchpad Settings 1:43 Update...
Read more >
Fix: Touchpad Gestures Not Working In Windows 10
If only one or two gestures are not working, it's likely because your laptop doesn't have a precision touchpad. You can navigate to...
Read more >
How to Fix Touch Gestures Not Working in Windows 11?
The first thing you need to do when troubleshooting this issue is to ensure that gesture support is enabled at the operating system...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found