Merge pull request #6192 from tchandelle/delete-vertex
Modify interaction: always stop event propagation when removing vertex
This commit is contained in:
@@ -823,16 +823,16 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
|
|||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.removePoint = function() {
|
ol.interaction.Modify.prototype.removePoint = function() {
|
||||||
var handled = false;
|
|
||||||
if (this.lastPointerEvent_ && this.lastPointerEvent_.type != ol.MapBrowserEvent.EventType.POINTERDRAG) {
|
if (this.lastPointerEvent_ && this.lastPointerEvent_.type != ol.MapBrowserEvent.EventType.POINTERDRAG) {
|
||||||
var evt = this.lastPointerEvent_;
|
var evt = this.lastPointerEvent_;
|
||||||
this.willModifyFeatures_(evt);
|
this.willModifyFeatures_(evt);
|
||||||
handled = this.removeVertex_();
|
this.removeVertex_();
|
||||||
this.dispatchEvent(new ol.interaction.Modify.Event(
|
this.dispatchEvent(new ol.interaction.Modify.Event(
|
||||||
ol.interaction.Modify.EventType.MODIFYEND, this.features_, evt));
|
ol.interaction.Modify.EventType.MODIFYEND, this.features_, evt));
|
||||||
this.modified_ = false;
|
this.modified_ = false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return handled;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user