Fixed a problem with preventDefaultAction for the canvas-drag event

This commit is contained in:
Ian Gilman 2017-08-03 10:47:35 -07:00
parent a77ffd1133
commit 49ee98bbb0
2 changed files with 3 additions and 1 deletions

View File

@ -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:

View File

@ -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;