mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Only apply constraints during an actual drag
This commit is contained in:
parent
ab6cdf102e
commit
bb229c24d3
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user