Rename ol.CollectionProperty to ol.Collection.Property

This commit is contained in:
Frederic Junod
2016-08-29 12:10:12 +02:00
committed by Tim Schaub
parent 5457917e75
commit 21d436e529
2 changed files with 11 additions and 10 deletions

View File

@@ -10,14 +10,6 @@ goog.require('ol.events.Event');
goog.require('ol.Object');
/**
* @enum {string}
*/
ol.CollectionProperty = {
LENGTH: 'length'
};
/**
* @classdesc
* An expanded version of standard JS Array, adding convenience methods for
@@ -121,7 +113,7 @@ ol.Collection.prototype.item = function(index) {
* @api stable
*/
ol.Collection.prototype.getLength = function() {
return /** @type {number} */ (this.get(ol.CollectionProperty.LENGTH));
return /** @type {number} */ (this.get(ol.Collection.Property.LENGTH));
};
@@ -227,7 +219,15 @@ ol.Collection.prototype.setAt = function(index, elem) {
* @private
*/
ol.Collection.prototype.updateLength_ = function() {
this.set(ol.CollectionProperty.LENGTH, this.array_.length);
this.set(ol.Collection.Property.LENGTH, this.array_.length);
};
/**
* @enum {string}
*/
ol.Collection.Property = {
LENGTH: 'length'
};