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
+1
View File
@@ -12,6 +12,7 @@ A number of internal types have been renamed. This will not affect those who us
* rename `ol.style.IconOrigin` to `ol.style.Icon.Origin` * rename `ol.style.IconOrigin` to `ol.style.Icon.Origin`
* rename `ol.format.IGCZ` to `ol.format.IGC.Z` * rename `ol.format.IGCZ` to `ol.format.IGC.Z`
* rename `ol.layer.GroupProperty` to `ol.layer.Group.Property` * rename `ol.layer.GroupProperty` to `ol.layer.Group.Property`
* rename `ol.CollectionProperty` to `ol.Collection.Property`
### v3.18.0 ### v3.18.0
+10 -10
View File
@@ -10,14 +10,6 @@ goog.require('ol.events.Event');
goog.require('ol.Object'); goog.require('ol.Object');
/**
* @enum {string}
*/
ol.CollectionProperty = {
LENGTH: 'length'
};
/** /**
* @classdesc * @classdesc
* An expanded version of standard JS Array, adding convenience methods for * An expanded version of standard JS Array, adding convenience methods for
@@ -121,7 +113,7 @@ ol.Collection.prototype.item = function(index) {
* @api stable * @api stable
*/ */
ol.Collection.prototype.getLength = function() { 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 * @private
*/ */
ol.Collection.prototype.updateLength_ = function() { 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'
}; };