mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +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>
|
* 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]
|
* @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]
|
* @property {Number} [zoomPerSecond=1.0]
|
||||||
* Sets the zoom amount per second when zoomIn/zoomOut buttons are pressed and held.
|
* Sets the zoom amount per second when zoomIn/zoomOut buttons are pressed and held.
|
||||||
|
@ -215,6 +215,7 @@ $.Viewer = function( options ) {
|
|||||||
onfullscreenchange: null,
|
onfullscreenchange: null,
|
||||||
lastClickTime: null,
|
lastClickTime: null,
|
||||||
draggingToZoom: false,
|
draggingToZoom: false,
|
||||||
|
dblClickTimeThreshold: 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
this._sequenceIndex = 0;
|
this._sequenceIndex = 0;
|
||||||
@ -3200,6 +3201,7 @@ function onCanvasPress( event ) {
|
|||||||
|
|
||||||
gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
|
gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
|
||||||
if ( gestureSettings.dblClickDragToZoom ){
|
if ( gestureSettings.dblClickDragToZoom ){
|
||||||
|
var dblClickTimeThreshold = THIS[ this.hash ].dblClickTimeThreshold;
|
||||||
var lastClickTime = THIS[ this.hash ].lastClickTime;
|
var lastClickTime = THIS[ this.hash ].lastClickTime;
|
||||||
var currClickTime = $.now();
|
var currClickTime = $.now();
|
||||||
|
|
||||||
@ -3207,7 +3209,7 @@ function onCanvasPress( event ) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((currClickTime - lastClickTime) < 2000) {
|
if ((currClickTime - lastClickTime) < dblClickTimeThreshold) {
|
||||||
THIS[ this.hash ].draggingToZoom = true;
|
THIS[ this.hash ].draggingToZoom = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user