mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-16 14:53:14 +03:00
Only apply constraints during an actual drag
This commit is contained in:
parent
ab6cdf102e
commit
bb229c24d3
@ -2573,13 +2573,13 @@ function onCanvasDrag( event ) {
|
|||||||
if( !this.panVertical ){
|
if( !this.panVertical ){
|
||||||
event.delta.y = 0;
|
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 );
|
this.viewport.panBy( this.viewport.deltaPointsFromPixels( event.delta.negate() ), gestureSettings.flickEnabled );
|
||||||
}
|
|
||||||
if( this.constrainDuringPan ){
|
if( this.constrainDuringPan ){
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onCanvasDragEnd( event ) {
|
function onCanvasDragEnd( event ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user