Merge pull request #5769 from bartvde/issue-5759

Only call addToDrawing if sketchFeature
This commit is contained in:
Bart van den Eijnden
2016-08-29 09:59:37 +02:00
committed by GitHub

View File

@@ -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 ===