Only stop animation when animating

This commit is contained in:
Andreas Hocevar
2017-01-21 14:23:58 +01:00
parent a993cf4a04
commit c78746b309

View File

@@ -133,7 +133,9 @@ ol.interaction.DragPan.handleDownEvent_ = function(mapBrowserEvent) {
view.setHint(ol.ViewHint.INTERACTING, 1);
}
// stop any current animation
view.setCenter(mapBrowserEvent.frameState.viewState.center);
if (view.getHints()[ol.ViewHint.ANIMATING]) {
view.setCenter(mapBrowserEvent.frameState.viewState.center);
}
if (this.kinetic_) {
this.kinetic_.begin();
}