Allow for events on other elements than the map viewport.

Not registering browser events as priority events makes it easy for controls to preventDefault or stopPropagation when events are registered on children of the map viewport element.
This commit is contained in:
ahocevar
2012-07-08 12:14:26 +02:00
parent e67e9049ca
commit a38a331085

View File

@@ -160,7 +160,7 @@ ol.event.Events.prototype.setElement = function(element) {
if (this.element_) {
for (t in types) {
goog.events.unlisten(
this.element_, types[t], this.handleBrowserEvent, true, this
this.element_, types[t], this.handleBrowserEvent, false, this
);
}
this.destroySequences();
@@ -171,7 +171,7 @@ ol.event.Events.prototype.setElement = function(element) {
this.createSequences();
for (t in types) {
goog.events.listen(
element, types[t], this.handleBrowserEvent, true, this
element, types[t], this.handleBrowserEvent, false, this
);
}
}