Only apply constraints during an actual drag

This commit is contained in:
superbland 2017-04-24 22:47:40 +01:00
parent ab6cdf102e
commit bb229c24d3

View File

@ -2573,13 +2573,13 @@ 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();
}
}
}
}
function onCanvasDragEnd( event ) {