Merge pull request #8573 from fredj/f8360

Fix freehand polygon drawing
This commit is contained in:
Frédéric Junod
2018-09-03 12:40:34 +02:00
committed by GitHub

View File

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