mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
pr changes
This commit is contained in:
parent
cb2fbe9b50
commit
6540a57aa9
@ -411,7 +411,7 @@
|
||||
* The "zoom distance" per mouse scroll or touch pinch. <em><strong>Note:</strong> Setting this to 1.0 effectively disables the mouse-wheel zoom feature (also see gestureSettings[Mouse|Touch|Pen].scrollToZoom}).</em>
|
||||
*
|
||||
* @property {Number} [zoomPerDblClickDrag=1.2]
|
||||
* The "zoom distance" per mouse drag. <em><strong>Note:</strong> Setting this to 1.0 effectively disables the double-click-drag-to-Zoom feature (also see gestureSettings[Mouse|Touch|Pen].dblClickDragToZoom).</em>
|
||||
* The "zoom distance" per double-click mouse drag. <em><strong>Note:</strong> Setting this to 1.0 effectively disables the double-click-drag-to-Zoom feature (also see gestureSettings[Mouse|Touch|Pen].dblClickDragToZoom).</em>
|
||||
*
|
||||
* @property {Number} [zoomPerSecond=1.0]
|
||||
* Sets the zoom amount per second when zoomIn/zoomOut buttons are pressed and held.
|
||||
|
@ -215,6 +215,7 @@ $.Viewer = function( options ) {
|
||||
onfullscreenchange: null,
|
||||
lastClickTime: null,
|
||||
draggingToZoom: false,
|
||||
dblClickTimeThreshold: 1000
|
||||
};
|
||||
|
||||
this._sequenceIndex = 0;
|
||||
@ -3200,6 +3201,7 @@ function onCanvasPress( event ) {
|
||||
|
||||
gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
|
||||
if ( gestureSettings.dblClickDragToZoom ){
|
||||
var dblClickTimeThreshold = THIS[ this.hash ].dblClickTimeThreshold;
|
||||
var lastClickTime = THIS[ this.hash ].lastClickTime;
|
||||
var currClickTime = $.now();
|
||||
|
||||
@ -3207,7 +3209,7 @@ function onCanvasPress( event ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((currClickTime - lastClickTime) < 2000) {
|
||||
if ((currClickTime - lastClickTime) < dblClickTimeThreshold) {
|
||||
THIS[ this.hash ].draggingToZoom = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user