Only draw when one pointer is active
This commit is contained in:
@@ -535,7 +535,7 @@ class Draw extends PointerInteraction {
|
||||
event.type === MapBrowserEventType.POINTERDOWN
|
||||
) {
|
||||
pass = false;
|
||||
} else if (move) {
|
||||
} else if (move && this.getPointerCount() === 1) {
|
||||
pass = event.type === MapBrowserEventType.POINTERMOVE;
|
||||
if (pass && this.freehand_) {
|
||||
this.handlePointerMove_(event);
|
||||
@@ -603,6 +603,7 @@ class Draw extends PointerInteraction {
|
||||
handleUpEvent(event) {
|
||||
let pass = true;
|
||||
|
||||
if (this.getPointerCount() === 0) {
|
||||
if (this.downTimeout_) {
|
||||
clearTimeout(this.downTimeout_);
|
||||
this.downTimeout_ = undefined;
|
||||
@@ -631,6 +632,8 @@ class Draw extends PointerInteraction {
|
||||
} else if (this.freehand_) {
|
||||
this.abortDrawing();
|
||||
}
|
||||
}
|
||||
|
||||
if (!pass && this.stopClick_) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user