Merge pull request #13219 from ahocevar/modify-delete-no-event
Do not fire modifyend event when nothing was modified
This commit is contained in:
@@ -1360,13 +1360,16 @@ class Modify extends PointerInteraction {
|
||||
const evt = this.lastPointerEvent_;
|
||||
this.willModifyFeatures_(evt, this.dragSegments_);
|
||||
const removed = this.removeVertex_();
|
||||
this.dispatchEvent(
|
||||
new ModifyEvent(
|
||||
ModifyEventType.MODIFYEND,
|
||||
this.featuresBeingModified_,
|
||||
evt
|
||||
)
|
||||
);
|
||||
if (this.featuresBeingModified_) {
|
||||
this.dispatchEvent(
|
||||
new ModifyEvent(
|
||||
ModifyEventType.MODIFYEND,
|
||||
this.featuresBeingModified_,
|
||||
evt
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
this.featuresBeingModified_ = null;
|
||||
return removed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user