Removing side effects from logical expression

This commit is contained in:
Tim Schaub
2017-02-03 14:09:15 -07:00
parent 54c8beef4e
commit 14222e68e7

View File

@@ -187,8 +187,8 @@ ol.interaction.Pointer.handleEvent = function(mapBrowserEvent) {
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDRAG) {
this.handleDragEvent_(mapBrowserEvent);
} else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
this.handlingDownUpSequence = this.handleUpEvent_(mapBrowserEvent) &&
this.targetPointers.length > 0;
var handledUp = this.handleUpEvent_(mapBrowserEvent);
this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;
}
} else {
if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDOWN) {