Consider pointerdown only if the last pointerup has been emitted
This commit is contained in:
@@ -187,9 +187,10 @@ ol.interaction.Pointer.handleEvent = function(mapBrowserEvent) {
|
|||||||
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDRAG) {
|
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDRAG) {
|
||||||
this.handleDragEvent_(mapBrowserEvent);
|
this.handleDragEvent_(mapBrowserEvent);
|
||||||
} else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
|
} else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
|
||||||
this.handlingDownUpSequence = this.handleUpEvent_(mapBrowserEvent);
|
this.handleUpEvent_(mapBrowserEvent);
|
||||||
}
|
this.handlingDownUpSequence = false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDOWN) {
|
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDOWN) {
|
||||||
var handled = this.handleDownEvent_(mapBrowserEvent);
|
var handled = this.handleDownEvent_(mapBrowserEvent);
|
||||||
this.handlingDownUpSequence = handled;
|
this.handlingDownUpSequence = handled;
|
||||||
@@ -197,6 +198,7 @@ ol.interaction.Pointer.handleEvent = function(mapBrowserEvent) {
|
|||||||
} else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE) {
|
} else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE) {
|
||||||
this.handleMoveEvent_(mapBrowserEvent);
|
this.handleMoveEvent_(mapBrowserEvent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return !stopEvent;
|
return !stopEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user