Only remove the vertex feature if it exists
When deleting a vertex shared by multiple features, we iterate through drag segments and only need to remove the vertex feature once.
This commit is contained in:
@@ -888,8 +888,10 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
|
|||||||
newSegmentData);
|
newSegmentData);
|
||||||
this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);
|
this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);
|
||||||
|
|
||||||
this.overlay_.getSource().removeFeature(this.vertexFeature_);
|
if (!goog.isNull(this.vertexFeature_)) {
|
||||||
this.vertexFeature_ = null;
|
this.overlay_.getSource().removeFeature(this.vertexFeature_);
|
||||||
|
this.vertexFeature_ = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user