touch-action fixup

This commit is contained in:
Mark Salsbery 2014-08-05 16:01:43 -07:00
parent 3521bac90e
commit bf19e73f5e
5 changed files with 24 additions and 24 deletions

View File

@ -137,10 +137,10 @@ $.Button = function( options ) {
this.tooltip;
this.element.style.position = "relative";
if ( this.element.style[ "touch-action" ] !== undefined ) {
this.element.style[ "touch-action" ] = "none";
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
this.element.style[ "-ms-touch-action" ] = "none";
if ( typeof this.element.style.touchAction !== 'undefined' ) {
this.element.style.touchAction = 'none';
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
this.element.style.msTouchAction = 'none';
}
this.imgGroup.style.position =

View File

@ -80,10 +80,10 @@ $.ButtonGroup = function( options ) {
}
}
if ( this.element.style[ "touch-action" ] !== undefined ) {
this.element.style[ "touch-action" ] = "none";
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
this.element.style[ "-ms-touch-action" ] = "none";
if ( typeof this.element.style.touchAction !== 'undefined' ) {
this.element.style.touchAction = 'none';
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
this.element.style.msTouchAction = 'none';
}
/**

View File

@ -112,10 +112,10 @@ $.Navigator = function( options ){
options.minPixelRatio = this.minPixelRatio = viewer.minPixelRatio;
if ( this.element.style[ "touch-action" ] !== undefined ) {
this.element.style[ "touch-action" ] = "none";
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
this.element.style[ "-ms-touch-action" ] = "none";
if ( typeof this.element.style.touchAction !== 'undefined' ) {
this.element.style.touchAction = 'none';
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
this.element.style.msTouchAction = 'none';
}
this.borderWidth = 2;

View File

@ -114,10 +114,10 @@ $.ReferenceStrip = function ( options ) {
style.background = '#000';
style.position = 'relative';
if ( this.element.style[ "touch-action" ] !== undefined ) {
this.element.style[ "touch-action" ] = "none";
} else if ( this.element.style[ "-ms-touch-action" ] !== undefined ) {
this.element.style[ "-ms-touch-action" ] = "none";
if ( typeof this.element.style.touchAction !== 'undefined' ) {
this.element.style.touchAction = 'none';
} else if ( typeof this.element.style.msTouchAction !== 'undefined' ) {
this.element.style.msTouchAction = 'none';
}
$.setElementOpacity( this.element, 0.8 );
@ -195,10 +195,10 @@ $.ReferenceStrip = function ( options ) {
element.style.cssFloat = 'left'; //Firefox
element.style.styleFloat = 'left'; //IE
element.style.padding = '2px';
if ( element.style[ "touch-action" ] !== undefined ) {
element.style[ "touch-action" ] = "none";
} else if ( element.style[ "-ms-touch-action" ] !== undefined ) {
element.style[ "-ms-touch-action" ] = "none";
if ( typeof element.style.touchAction !== 'undefined' ) {
element.style.touchAction = 'none';
} else if ( typeof element.style.msTouchAction !== 'undefined' ) {
element.style.msTouchAction = 'none';
}
element.innerTracker = new $.MouseTracker( {

View File

@ -276,10 +276,10 @@ $.Viewer = function( options ) {
style.top = "0px";
style.left = "0px";
// Disable browser default touch handling
if ( style[ "touch-action" ] !== undefined ) {
style[ "touch-action" ] = "none";
} else if ( style["-ms-touch-action"] !== undefined ) {
style[ "-ms-touch-action" ] = "none";
if ( typeof style.touchAction !== 'undefined' ) {
style.touchAction = 'none';
} else if ( typeof style.msTouchAction !== 'undefined' ) {
style.msTouchAction = 'none';
}
}(this.canvas.style));