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.

Mobile gestureSettingsTouch

See original GitHub issue

hello, i’m trying to remove all the control in smartphone devices, like touches. I try this

gestureSettingsTouch: { scrollToZoom: false, clickToZoom:false,pinchToZoom:false, dblClickToZoom:false,flickEnabled:false }

i check it but it doesnt work. someone can you help me thanx for your collaboration Simone

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
avandecremecommented, Sep 23, 2016

So it seems that everything get disabled except for the pan on drag, correct?

@msalsbery Any idea?

0reactions
iangilmancommented, Oct 10, 2016

More like this:

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

…and this:

function onCanvasDrag( event ) {
    var gestureSettings;

    if ( !event.preventDefaultAction && this.viewport ) {
        gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
        if (gestureSettings.dragToPan) {
            if( !this.panHorizontal ){
                event.delta.x = 0;
            }
            if( !this.panVertical ){
                event.delta.y = 0;
            }
            this.viewport.panBy( this.viewport.deltaPointsFromPixels( event.delta.negate() ), gestureSettings.flickEnabled );
            if( this.constrainDuringPan ){
                this.viewport.applyConstraints();
            }
        }

    }
...

…and document that option there: https://github.com/openseadragon/openseadragon/blob/master/src/openseadragon.js#L621 https://github.com/openseadragon/openseadragon/blob/master/src/openseadragon.js#L301-L347

Read more comments on GitHub >

github_iconTop Results From Across the Web

Namespace: OpenSeadragon
It is recommended to change setting to true for mobile devices. ... gestureSettingsTouch, OpenSeadragon.GestureSettings, <optional>
Read more >
openseadragon/openseadragon - Gitter
First post here. I've forked https://github.com/altert/OpenseadragonFabricjsOverlay and modified it to support Paper.js instead of Fabric.js.
Read more >
Dolphin Browser HD - Fast & Elegant Mobile Browsing On ...
Dolphin Browser HD is a mobile browser for Android 2.0.1 and up. ... To view all gestures and access gesture settings, touch the...
Read more >
openseadragon.js - searchcode
It is recommended to change 205 * setting to true for mobile devices. ... Zoom on scroll gesture 295 * @property {Boolean} [gestureSettingsTouch....
Read more >
OpenSeadragon IE10 IndexSizeError on Tile.drawCanvas call ...
Set to 1.5 for mobile on slow connection defaultZoomLevel: 0, ... gestureSettingsTouch: gestureSettingsTouch, smoothTileEdgesMinZoom: Infinity, ...
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