Remove all the sketch features in abortDrawing

This commit is contained in:
Frederic Junod
2019-11-06 14:18:55 +01:00
parent 146e38c7ef
commit 51c9b56254
2 changed files with 22 additions and 6 deletions

View File

@@ -881,12 +881,10 @@ class Draw extends PointerInteraction {
abortDrawing_() {
this.finishCoordinate_ = null;
const sketchFeature = this.sketchFeature_;
if (sketchFeature) {
this.sketchFeature_ = null;
this.sketchPoint_ = null;
this.sketchLine_ = null;
this.overlay_.getSource().clear(true);
}
this.sketchFeature_ = null;
this.sketchPoint_ = null;
this.sketchLine_ = null;
this.overlay_.getSource().clear(true);
return sketchFeature;
}