From 49ee98bbb05f9a3749bd6a61e6bdf640036ec40d Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 3 Aug 2017 10:47:35 -0700 Subject: [PATCH] Fixed a problem with preventDefaultAction for the canvas-drag event --- changelog.txt | 1 + src/viewer.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 531af964..7a04e821 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ OPENSEADRAGON CHANGELOG 2.3.1: (In Progress) * Debug mode now uses different colors for different tiled images (customizable via debugGridColor) (#1271) +* Fixed a problem with preventDefaultAction for the canvas-drag event () 2.3.0: diff --git a/src/viewer.js b/src/viewer.js index 649456de..0921eca8 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2655,6 +2655,7 @@ function onCanvasDrag( event ) { originalEvent: event.originalEvent, preventDefaultAction: event.preventDefaultAction }; + /** * Raised when a mouse or touch drag operation occurs on the {@link OpenSeadragon.Viewer#canvas} element. * @@ -2674,7 +2675,7 @@ function onCanvasDrag( event ) { */ this.raiseEvent( 'canvas-drag', canvasDragEventArgs); - if ( !event.preventDefaultAction && this.viewport ) { + if ( !canvasDragEventArgs.preventDefaultAction && this.viewport ) { gestureSettings = this.gestureSettingsByDeviceType( event.pointerType ); if( !this.panHorizontal ){ event.delta.x = 0;