diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index 1422302fb3..0fb61d448e 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -423,6 +423,9 @@ Draw.prototype.handlePointerMove_ = function(event) { this.shouldHandle_ = this.freehand_ ? squaredDistance > this.squaredClickTolerance_ : squaredDistance <= this.squaredClickTolerance_; + if (!this.shouldHandle_) { + return true; + } } if (this.finishCoordinate_) { diff --git a/test/spec/ol/interaction/draw.test.js b/test/spec/ol/interaction/draw.test.js index 1fc1b912bd..cf29e89cb5 100644 --- a/test/spec/ol/interaction/draw.test.js +++ b/test/spec/ol/interaction/draw.test.js @@ -339,7 +339,6 @@ describe('ol.interaction.Draw', function() { simulateEvent('pointermove', 20, 30); // freehand - simulateEvent('pointerdown', 20, 30, true); simulateEvent('pointermove', 20, 30, true); simulateEvent('pointerdrag', 20, 30, true); simulateEvent('pointermove', 30, 40, true);