Merge pull request #12408 from ahocevar/modify-no-insert

Do not fire modifystart when nothing is being modified
This commit is contained in:
Andreas Hocevar
2021-06-21 08:05:53 +02:00
committed by GitHub
2 changed files with 39 additions and 9 deletions

View File

@@ -435,14 +435,17 @@ class Modify extends PointerInteraction {
}
}
}
this.dispatchEvent(
new ModifyEvent(
ModifyEventType.MODIFYSTART,
this.featuresBeingModified_,
evt
)
);
if (this.featuresBeingModified_.getLength() === 0) {
this.featuresBeingModified_ = null;
} else {
this.dispatchEvent(
new ModifyEvent(
ModifyEventType.MODIFYSTART,
this.featuresBeingModified_,
evt
)
);
}
}
}