diff --git a/src/viewer.js b/src/viewer.js index 7a75d6a5..ec4c8242 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2573,11 +2573,11 @@ function onCanvasDrag( event ) { if( !this.panVertical ){ event.delta.y = 0; } - if( event.delta.x !== 0 || event.delta.y !== 0){ + if( event.delta.x !== 0 || event.delta.y !== 0 ){ this.viewport.panBy( this.viewport.deltaPointsFromPixels( event.delta.negate() ), gestureSettings.flickEnabled ); - } - if( this.constrainDuringPan ){ - this.viewport.applyConstraints(); + if( this.constrainDuringPan ){ + this.viewport.applyConstraints(); + } } } }