Use goog.array.forEach to unlisten the array of keys
This commit is contained in:
+2
-4
@@ -1118,10 +1118,8 @@ ol.Map.prototype.handleLayerGroupPropertyChanged_ = function(event) {
|
|||||||
*/
|
*/
|
||||||
ol.Map.prototype.handleLayerGroupChanged_ = function() {
|
ol.Map.prototype.handleLayerGroupChanged_ = function() {
|
||||||
if (!goog.isNull(this.layerGroupPropertyListenerKeys_)) {
|
if (!goog.isNull(this.layerGroupPropertyListenerKeys_)) {
|
||||||
var length = this.layerGroupPropertyListenerKeys_.length;
|
goog.array.forEach(this.layerGroupPropertyListenerKeys_,
|
||||||
for (var i = 0; i < length; ++i) {
|
goog.events.unlistenByKey);
|
||||||
goog.events.unlistenByKey(this.layerGroupPropertyListenerKeys_[i]);
|
|
||||||
}
|
|
||||||
this.layerGroupPropertyListenerKeys_ = null;
|
this.layerGroupPropertyListenerKeys_ = null;
|
||||||
}
|
}
|
||||||
var layerGroup = this.getLayerGroup();
|
var layerGroup = this.getLayerGroup();
|
||||||
|
|||||||
Reference in New Issue
Block a user