From 1d5b059fcc9a0ec23b0f211b05a6fc496010414d Mon Sep 17 00:00:00 2001 From: Mark Salsbery Date: Wed, 6 Aug 2014 11:26:18 -0700 Subject: [PATCH] Call Viewport.applyConstraints() on drag-end when flick gesture is enabled --- src/viewer.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index 46d6a527..fca5d6de 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2388,8 +2388,8 @@ function onCanvasDragEnd( event ) { target.y = center.y; } this.viewport.panTo( target, false ); - this.viewport.applyConstraints(); } + this.viewport.applyConstraints(); } /** * Raised when a mouse or touch drag operation ends on the {@link OpenSeadragon.Viewer#canvas} element. @@ -2417,15 +2417,6 @@ function onCanvasDragEnd( event ) { } function onCanvasRelease( event ) { - var gestureSettings; - - if ( event.insideElementPressed && this.viewport ) { - gestureSettings = this.gestureSettingsByDeviceType( event.pointerType ); - - if ( !gestureSettings.flickEnabled ) { - this.viewport.applyConstraints(); - } - } /** * Raised when the mouse button is released or touch ends on the {@link OpenSeadragon.Viewer#canvas} element. *