mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-31 23:21:42 +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,
|
||||
enterHandler: $.delegate( this, onContainerEnter ),
|
||||
exitHandler: $.delegate( this, onContainerExit ),
|
||||
pressHandler: $.delegate( this, onContainerPress ),
|
||||
releaseHandler: $.delegate( this, onContainerRelease )
|
||||
}).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 ) {
|
||||
if ( !event.insideElementReleased ) {
|
||||
if ( !event.insideElementReleased || ( event.pointerType === 'touch' && !$.MouseTracker.haveTouchEnter ) ) {
|
||||
THIS[ this.hash ].mouseInside = false;
|
||||
if ( !THIS[ this.hash ].animating ) {
|
||||
beginControlsAutoHide( this );
|
||||
|
Loading…
x
Reference in New Issue
Block a user