Merge pull request #9070 from ludvigeriksson/remove-point-return-value
Modify.removePoint returns true only when a vertex was removed
This commit is contained in:
@@ -1023,10 +1023,10 @@ class Modify extends PointerInteraction {
|
|||||||
if (this.lastPointerEvent_ && this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG) {
|
if (this.lastPointerEvent_ && this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG) {
|
||||||
const evt = this.lastPointerEvent_;
|
const evt = this.lastPointerEvent_;
|
||||||
this.willModifyFeatures_(evt);
|
this.willModifyFeatures_(evt);
|
||||||
this.removeVertex_();
|
const removed = this.removeVertex_();
|
||||||
this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));
|
this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));
|
||||||
this.modified_ = false;
|
this.modified_ = false;
|
||||||
return true;
|
return removed;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user