mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-08 02:49:22 +03:00
iOS touch enter/exit fix
This commit is contained in:
parent
765df51bd3
commit
d9dfd0a435
@ -402,6 +402,7 @@ $.Viewer = function( options ) {
|
|||||||
clickDistThreshold: this.clickDistThreshold,
|
clickDistThreshold: this.clickDistThreshold,
|
||||||
enterHandler: $.delegate( this, onContainerEnter ),
|
enterHandler: $.delegate( this, onContainerEnter ),
|
||||||
exitHandler: $.delegate( this, onContainerExit ),
|
exitHandler: $.delegate( this, onContainerExit ),
|
||||||
|
pressHandler: $.delegate( this, onContainerPress ),
|
||||||
releaseHandler: $.delegate( this, onContainerRelease )
|
releaseHandler: $.delegate( this, onContainerRelease )
|
||||||
}).setTracking( this.mouseNavEnabled ? true : false ); // always tracking
|
}).setTracking( this.mouseNavEnabled ? true : false ); // always tracking
|
||||||
|
|
||||||
@ -2498,8 +2499,15 @@ function onContainerExit( event ) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onContainerPress( event ) {
|
||||||
|
if ( event.pointerType === 'touch' && !$.MouseTracker.haveTouchEnter ) {
|
||||||
|
THIS[ this.hash ].mouseInside = true;
|
||||||
|
abortControlsAutoHide( this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onContainerRelease( event ) {
|
function onContainerRelease( event ) {
|
||||||
if ( !event.insideElementReleased ) {
|
if ( !event.insideElementReleased || ( event.pointerType === 'touch' && !$.MouseTracker.haveTouchEnter ) ) {
|
||||||
THIS[ this.hash ].mouseInside = false;
|
THIS[ this.hash ].mouseInside = false;
|
||||||
if ( !THIS[ this.hash ].animating ) {
|
if ( !THIS[ this.hash ].animating ) {
|
||||||
beginControlsAutoHide( this );
|
beginControlsAutoHide( this );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user