From b56fa824469f896534b22529f588d201a13db4ae Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 18 Dec 2017 13:38:15 +0100 Subject: [PATCH] Rename _ol_Collection_.Property_ to Property --- src/ol/Collection.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/ol/Collection.js b/src/ol/Collection.js index 253647aa3c..d784c12e6f 100644 --- a/src/ol/Collection.js +++ b/src/ol/Collection.js @@ -8,6 +8,16 @@ import _ol_Object_ from './Object.js'; import Event from './events/Event.js'; + +/** + * @enum {string} + * @private + */ +var Property = { + LENGTH: 'length' +}; + + /** * @typedef {{unique: (boolean|undefined)}} */ @@ -139,9 +149,7 @@ _ol_Collection_.prototype.item = function(index) { * @api */ _ol_Collection_.prototype.getLength = function() { - return ( - /** @type {number} */ this.get(_ol_Collection_.Property_.LENGTH) - ); + return (/** @type {number} */ this.get(Property.LENGTH)); }; @@ -256,7 +264,7 @@ _ol_Collection_.prototype.setAt = function(index, elem) { * @private */ _ol_Collection_.prototype.updateLength_ = function() { - this.set(_ol_Collection_.Property_.LENGTH, this.array_.length); + this.set(Property.LENGTH, this.array_.length); }; @@ -273,16 +281,6 @@ _ol_Collection_.prototype.assertUnique_ = function(elem, opt_except) { } }; - -/** - * @enum {string} - * @private - */ -_ol_Collection_.Property_ = { - LENGTH: 'length' -}; - - /** * @classdesc * Events emitted by {@link ol.Collection} instances are instances of this