From 595009726f8f81105ddd919fe932218a70f7125b Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 3 Sep 2018 11:56:30 +0200 Subject: [PATCH] Fix freehand polygon drawing Fixes #8360 --- 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 63713f8369..f89b33e944 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -834,7 +834,7 @@ export function handleEvent(event) { this.freehand_ = this.mode_ !== Mode.POINT && this.freehandCondition_(event); let move = event.type === MapBrowserEventType.POINTERMOVE; let pass = true; - if (this.lastDragTime_ && event.type === MapBrowserEventType.POINTERDRAG) { + if (!this.freehand_ && this.lastDragTime_ && event.type === MapBrowserEventType.POINTERDRAG) { const now = Date.now(); if (now - this.lastDragTime_ >= this.dragVertexDelay_) { this.downPx_ = event.pixel;