Remove the vertex on ol.interaction.Modify deactivation

This commit is contained in:
Frederic Junod
2016-10-14 11:21:40 +02:00
parent 1311f65ece
commit e853f1ed2a
2 changed files with 28 additions and 0 deletions

View File

@@ -258,6 +258,18 @@ ol.interaction.Modify.prototype.removeFeatureSegmentData_ = function(feature) {
};
/**
* @inheritDoc
*/
ol.interaction.Modify.prototype.setActive = function(active) {
if (this.vertexFeature_ && !active) {
this.overlay_.getSource().removeFeature(this.vertexFeature_);
this.vertexFeature_ = null;
}
ol.interaction.Pointer.prototype.setActive.call(this, active);
};
/**
* @inheritDoc
*/