mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Fixed a problem with preventDefaultAction for the canvas-drag event
This commit is contained in:
parent
a77ffd1133
commit
49ee98bbb0
@ -4,6 +4,7 @@ OPENSEADRAGON CHANGELOG
|
|||||||
2.3.1: (In Progress)
|
2.3.1: (In Progress)
|
||||||
|
|
||||||
* Debug mode now uses different colors for different tiled images (customizable via debugGridColor) (#1271)
|
* 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:
|
2.3.0:
|
||||||
|
|
||||||
|
@ -2655,6 +2655,7 @@ function onCanvasDrag( event ) {
|
|||||||
originalEvent: event.originalEvent,
|
originalEvent: event.originalEvent,
|
||||||
preventDefaultAction: event.preventDefaultAction
|
preventDefaultAction: event.preventDefaultAction
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raised when a mouse or touch drag operation occurs on the {@link OpenSeadragon.Viewer#canvas} element.
|
* 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);
|
this.raiseEvent( 'canvas-drag', canvasDragEventArgs);
|
||||||
|
|
||||||
if ( !event.preventDefaultAction && this.viewport ) {
|
if ( !canvasDragEventArgs.preventDefaultAction && this.viewport ) {
|
||||||
gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
|
gestureSettings = this.gestureSettingsByDeviceType( event.pointerType );
|
||||||
if( !this.panHorizontal ){
|
if( !this.panHorizontal ){
|
||||||
event.delta.x = 0;
|
event.delta.x = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user