mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-19 16:23:13 +03:00
prevent unnecessary panBy on canvas-drag in viewer
This commit is contained in:
parent
be382a47b6
commit
ab6cdf102e
@ -2573,7 +2573,9 @@ function onCanvasDrag( event ) {
|
|||||||
if( !this.panVertical ){
|
if( !this.panVertical ){
|
||||||
event.delta.y = 0;
|
event.delta.y = 0;
|
||||||
}
|
}
|
||||||
this.viewport.panBy( this.viewport.deltaPointsFromPixels( event.delta.negate() ), gestureSettings.flickEnabled );
|
if( event.delta.x !== 0 || event.delta.y !== 0){
|
||||||
|
this.viewport.panBy( this.viewport.deltaPointsFromPixels( event.delta.negate() ), gestureSettings.flickEnabled );
|
||||||
|
}
|
||||||
if( this.constrainDuringPan ){
|
if( this.constrainDuringPan ){
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user