be more explicit when calling goog.events.listen and unlisten

This commit is contained in:
Éric Lemoine
2012-07-12 08:20:42 +02:00
parent dea307e53a
commit 8206f11372
+2 -2
View File
@@ -57,7 +57,7 @@ ol.control.Attribution.prototype.setMap = function(map) {
ol.control.Attribution.prototype.activate = function() { ol.control.Attribution.prototype.activate = function() {
var active = goog.base(this, 'activate'); var active = goog.base(this, 'activate');
if (active) { if (active) {
goog.events.listen(this.map_, 'layeradd', this.update, undefined, this); goog.events.listen(this.map_, 'layeradd', this.update, false, this);
this.update(); this.update();
} }
return active; return active;
@@ -67,7 +67,7 @@ ol.control.Attribution.prototype.activate = function() {
ol.control.Attribution.prototype.deactivate = function() { ol.control.Attribution.prototype.deactivate = function() {
var inactive = goog.base(this, 'deactivate'); var inactive = goog.base(this, 'deactivate');
if (inactive) { if (inactive) {
goog.events.unlisten(this.map_, 'layeradd', this.update, undefined, this); goog.events.unlisten(this.map_, 'layeradd', this.update, false, this);
} }
return inactive; return inactive;
}; };