replaced ol.Collection with Array

This commit is contained in:
Fran Peručić
2015-03-29 10:57:44 +02:00
parent 254039a6ab
commit 4b85f5737c

View File

@@ -68,10 +68,10 @@ ol.interaction.Snap = function(opt_options) {
this.features_ = goog.isDef(options.features) ? options.features : null;
/**
* @type {ol.Collection.<goog.events.Key>}
* @type {Array.<goog.events.Key>}
* @private
*/
this.featuresListenerKeys_ = new ol.Collection();
this.featuresListenerKeys_ = [];
/**
* @type {Object.<number, goog.events.Key>}
@@ -303,8 +303,8 @@ ol.interaction.Snap.prototype.setMap = function(map) {
var features = this.getFeatures_();
if (currentMap) {
keys.forEach(ol.Observable.unByKey, this);
keys.clear();
goog.array.forEach(keys, ol.Observable.unByKey);
keys.length = 0;
features.forEach(this.forEachFeatureRemove_, this);
}