Triple Click Bug Fix

This commit is contained in:
Hamza Tatheer 2022-10-30 01:27:56 +05:00
parent 3ebc03ab3a
commit e4d9dcdd03

View File

@ -2913,9 +2913,16 @@ function onCanvasClick( event ) {
} }
if( gestureSettings.dblClickDragToZoom){ if( gestureSettings.dblClickDragToZoom){
if(THIS[ this.hash ].draggingToZoom === true){
THIS[ this.hash ].lastClickTime = null;
THIS[ this.hash ].draggingToZoom = false;
}
else{
THIS[ this.hash ].lastClickTime = $.now(); THIS[ this.hash ].lastClickTime = $.now();
} }
} }
}
} }
function onCanvasDblClick( event ) { function onCanvasDblClick( event ) {
@ -3211,9 +3218,6 @@ function onCanvasPress( event ) {
} }
function onCanvasRelease( event ) { function onCanvasRelease( event ) {
var gestureSettings;
/** /**
* Raised when the primary mouse button is released or touch ends on the {@link OpenSeadragon.Viewer#canvas} element. * Raised when the primary mouse button is released or touch ends on the {@link OpenSeadragon.Viewer#canvas} element.
* *
@ -3237,12 +3241,6 @@ function onCanvasRelease( event ) {
insideElementReleased: event.insideElementReleased, insideElementReleased: event.insideElementReleased,
originalEvent: event.originalEvent originalEvent: event.originalEvent
}); });
gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
if( gestureSettings.dblClickDragToZoom && THIS[ this.hash ].draggingToZoom === true ){
THIS[ this.hash ].draggingToZoom = false;
}
} }
function onCanvasNonPrimaryPress( event ) { function onCanvasNonPrimaryPress( event ) {