Remove goog.array.removeAt

This commit is contained in:
Nicholas L
2016-01-16 22:52:04 +13:00
parent 0d5168ca0b
commit 1089934486
+1 -2
View File
@@ -7,7 +7,6 @@ goog.provide('ol.Collection');
goog.provide('ol.CollectionEvent'); goog.provide('ol.CollectionEvent');
goog.provide('ol.CollectionEventType'); goog.provide('ol.CollectionEventType');
goog.require('goog.array');
goog.require('goog.events.Event'); goog.require('goog.events.Event');
goog.require('ol.Object'); goog.require('ol.Object');
@@ -238,7 +237,7 @@ ol.Collection.prototype.remove = function(elem) {
*/ */
ol.Collection.prototype.removeAt = function(index) { ol.Collection.prototype.removeAt = function(index) {
var prev = this.array_[index]; var prev = this.array_[index];
goog.array.removeAt(this.array_, index); this.array_.splice(index, 1);
this.updateLength_(); this.updateLength_();
this.dispatchEvent( this.dispatchEvent(
new ol.CollectionEvent(ol.CollectionEventType.REMOVE, prev, this)); new ol.CollectionEvent(ol.CollectionEventType.REMOVE, prev, this));