Merge pull request #9450 from ahocevar/later-interacting-flag

Set the interacting flag on pointerdrag instead of pointerdown
This commit is contained in:
Andreas Hocevar
2019-04-19 17:51:33 -07:00
committed by GitHub

View File

@@ -73,6 +73,10 @@ class DragPan extends PointerInteraction {
* @inheritDoc
*/
handleDragEvent(mapBrowserEvent) {
if (!this.panning_) {
this.panning_ = true;
this.getMap().getView().beginInteraction();
}
const targetPointers = this.targetPointers;
const centroid = centroidFromPointers(targetPointers);
if (targetPointers.length == this.lastPointersCount_) {
@@ -149,10 +153,6 @@ class DragPan extends PointerInteraction {
if (view.getAnimating()) {
view.cancelAnimations();
}
if (!this.panning_) {
this.panning_ = true;
this.getMap().getView().beginInteraction();
}
if (this.kinetic_) {
this.kinetic_.begin();
}