From 41a07b22508e944f11b849fb4157205361032a16 Mon Sep 17 00:00:00 2001 From: Hamza Tatheer Date: Sat, 22 Oct 2022 15:47:12 +0500 Subject: [PATCH] zoom equation updated --- src/openseadragon.js | 2 +- src/viewer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index ef8507cf..c778389d 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -1242,7 +1242,7 @@ function OpenSeadragon( options ){ }, zoomPerClick: 2, zoomPerScroll: 1.2, - zoomPerDblTapDrag: 10000000000000000000000, + zoomPerDblTapDrag: 1.2, zoomPerSecond: 1.0, blendTime: 0, alwaysBlend: false, diff --git a/src/viewer.js b/src/viewer.js index c68ea507..639bbb73 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2993,7 +2993,7 @@ function onCanvasDrag( event ) { gestureSettings = this.gestureSettingsByDeviceType( event.pointerType ); if (gestureSettings.dblClickToZoom && THIS[ this.hash ].draggingToZoom){ - var factor = Math.pow( this.zoomPerDblTapDrag, event.delta.y ); + var factor = Math.pow( this.zoomPerDblTapDrag, event.delta.y / 100 ); this.viewport.zoomBy(factor); this.viewport.applyConstraints(); }