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,11 +888,13 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
|
|||||||
newSegmentData);
|
newSegmentData);
|
||||||
this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);
|
this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);
|
||||||
|
|
||||||
|
if (!goog.isNull(this.vertexFeature_)) {
|
||||||
this.overlay_.getSource().removeFeature(this.vertexFeature_);
|
this.overlay_.getSource().removeFeature(this.vertexFeature_);
|
||||||
this.vertexFeature_ = null;
|
this.vertexFeature_ = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user