Travese the interaction array in reverse order.
The interactions added via getInteractions().push(...) are evaluated first.
This commit is contained in:
@@ -605,10 +605,13 @@ ol.Map.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
|
|||||||
var interactionsArray = /** @type {Array.<ol.interaction.Interaction>} */
|
var interactionsArray = /** @type {Array.<ol.interaction.Interaction>} */
|
||||||
interactions.getArray();
|
interactions.getArray();
|
||||||
if (this.dispatchEvent(mapBrowserEvent) !== false) {
|
if (this.dispatchEvent(mapBrowserEvent) !== false) {
|
||||||
goog.array.every(interactionsArray, function(interaction) {
|
for (var i = interactionsArray.length - 1; i >= 0; i--) {
|
||||||
|
var interaction = interactionsArray[i];
|
||||||
interaction.handleMapBrowserEvent(mapBrowserEvent);
|
interaction.handleMapBrowserEvent(mapBrowserEvent);
|
||||||
return !mapBrowserEvent.defaultPrevented;
|
if (mapBrowserEvent.defaultPrevented) {
|
||||||
});
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user