From 3118df320bf03622e4c9d788182c802191d36039 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Tue, 23 Aug 2016 18:05:06 +0200 Subject: [PATCH] Only call addToDrawing if sketchFeature --- src/ol/interaction/draw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/interaction/draw.js b/src/ol/interaction/draw.js index 6368e3135f..9f0345659a 100644 --- a/src/ol/interaction/draw.js +++ b/src/ol/interaction/draw.js @@ -346,7 +346,7 @@ ol.interaction.Draw.handleEvent = function(mapBrowserEvent) { } var pass = !this.freehand_; if (this.freehand_ && - mapBrowserEvent.type === ol.MapBrowserEvent.EventType.POINTERDRAG) { + mapBrowserEvent.type === ol.MapBrowserEvent.EventType.POINTERDRAG && this.sketchFeature_ !== null) { this.addToDrawing_(mapBrowserEvent); pass = false; } else if (mapBrowserEvent.type ===