mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-01 07:31:41 +03:00
touch-action fixup
This commit is contained in:
parent
3521bac90e
commit
bf19e73f5e
@ -137,10 +137,10 @@ $.Button = function( options ) {
|
|||||||
this.tooltip;
|
this.tooltip;
|
||||||
|
|
||||||
this.element.style.position = "relative";
|
this.element.style.position = "relative";
|
||||||
if ( this.element.style[ "touch-action" ] !== undefined ) {
|
if ( typeof this.element.style.touchAction !== 'undefined' ) {
|
||||||
this.element.style[ "touch-action" ] = "none";
|
this.element.style.touchAction = 'none';
|
||||||
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
|
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
|
||||||
this.element.style[ "-ms-touch-action" ] = "none";
|
this.element.style.msTouchAction = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.imgGroup.style.position =
|
this.imgGroup.style.position =
|
||||||
|
@ -80,10 +80,10 @@ $.ButtonGroup = function( options ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.element.style[ "touch-action" ] !== undefined ) {
|
if ( typeof this.element.style.touchAction !== 'undefined' ) {
|
||||||
this.element.style[ "touch-action" ] = "none";
|
this.element.style.touchAction = 'none';
|
||||||
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
|
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
|
||||||
this.element.style[ "-ms-touch-action" ] = "none";
|
this.element.style.msTouchAction = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,10 +112,10 @@ $.Navigator = function( options ){
|
|||||||
|
|
||||||
options.minPixelRatio = this.minPixelRatio = viewer.minPixelRatio;
|
options.minPixelRatio = this.minPixelRatio = viewer.minPixelRatio;
|
||||||
|
|
||||||
if ( this.element.style[ "touch-action" ] !== undefined ) {
|
if ( typeof this.element.style.touchAction !== 'undefined' ) {
|
||||||
this.element.style[ "touch-action" ] = "none";
|
this.element.style.touchAction = 'none';
|
||||||
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
|
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
|
||||||
this.element.style[ "-ms-touch-action" ] = "none";
|
this.element.style.msTouchAction = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.borderWidth = 2;
|
this.borderWidth = 2;
|
||||||
|
@ -114,10 +114,10 @@ $.ReferenceStrip = function ( options ) {
|
|||||||
style.background = '#000';
|
style.background = '#000';
|
||||||
style.position = 'relative';
|
style.position = 'relative';
|
||||||
|
|
||||||
if ( this.element.style[ "touch-action" ] !== undefined ) {
|
if ( typeof this.element.style.touchAction !== 'undefined' ) {
|
||||||
this.element.style[ "touch-action" ] = "none";
|
this.element.style.touchAction = 'none';
|
||||||
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
|
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
|
||||||
this.element.style[ "-ms-touch-action" ] = "none";
|
this.element.style.msTouchAction = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
$.setElementOpacity( this.element, 0.8 );
|
$.setElementOpacity( this.element, 0.8 );
|
||||||
@ -195,10 +195,10 @@ $.ReferenceStrip = function ( options ) {
|
|||||||
element.style.cssFloat = 'left'; //Firefox
|
element.style.cssFloat = 'left'; //Firefox
|
||||||
element.style.styleFloat = 'left'; //IE
|
element.style.styleFloat = 'left'; //IE
|
||||||
element.style.padding = '2px';
|
element.style.padding = '2px';
|
||||||
if ( element.style[ "touch-action" ] !== undefined ) {
|
if ( typeof element.style.touchAction !== 'undefined' ) {
|
||||||
element.style[ "touch-action" ] = "none";
|
element.style.touchAction = 'none';
|
||||||
} else if ( element.style[ "-ms-touch-action" ] !== undefined ) {
|
} else if ( typeof element.style.msTouchAction !== 'undefined' ) {
|
||||||
element.style[ "-ms-touch-action" ] = "none";
|
element.style.msTouchAction = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
element.innerTracker = new $.MouseTracker( {
|
element.innerTracker = new $.MouseTracker( {
|
||||||
|
@ -276,10 +276,10 @@ $.Viewer = function( options ) {
|
|||||||
style.top = "0px";
|
style.top = "0px";
|
||||||
style.left = "0px";
|
style.left = "0px";
|
||||||
// Disable browser default touch handling
|
// Disable browser default touch handling
|
||||||
if ( style[ "touch-action" ] !== undefined ) {
|
if ( typeof style.touchAction !== 'undefined' ) {
|
||||||
style[ "touch-action" ] = "none";
|
style.touchAction = 'none';
|
||||||
} else if ( style["-ms-touch-action"] !== undefined ) {
|
} else if ( typeof style.msTouchAction !== 'undefined' ) {
|
||||||
style[ "-ms-touch-action" ] = "none";
|
style.msTouchAction = 'none';
|
||||||
}
|
}
|
||||||
}(this.canvas.style));
|
}(this.canvas.style));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user