[OpenLayers-Commits] r2358 - sandbox/vector-2.4/lib/OpenLayers/Geometry
commits at openlayers.org
commits at openlayers.org
Mon Mar 5 19:19:34 EST 2007
Author: sderle
Date: 2007-03-05 19:19:33 -0500 (Mon, 05 Mar 2007)
New Revision: 2358
Modified:
sandbox/vector-2.4/lib/OpenLayers/Geometry/Collection.js
Log:
Collection.js coding standards.
Modified: sandbox/vector-2.4/lib/OpenLayers/Geometry/Collection.js
===================================================================
--- sandbox/vector-2.4/lib/OpenLayers/Geometry/Collection.js 2007-03-05 23:47:16 UTC (rev 2357)
+++ sandbox/vector-2.4/lib/OpenLayers/Geometry/Collection.js 2007-03-06 00:19:33 UTC (rev 2358)
@@ -7,7 +7,7 @@
*
* @requires OpenLayers/Geometry.js
*/
-OpenLayers.Geometry.Collection = function() {}
+OpenLayers.Geometry.Collection = OpenLayers.Class.create();
OpenLayers.Geometry.Collection.prototype = OpenLayers.Class.inherit( OpenLayers.Geometry, {
/** @type Array(OpenLayers.Geometry) */
components: null,
@@ -16,6 +16,7 @@
* @constructor
**/
initialize: function () {
+ alert("setting components on geometry");
OpenLayers.Geometry.prototype.initialize.apply(this, arguments);
this.components = [];
},
@@ -54,11 +55,7 @@
components = [components];
}
- if(this.components) {
- this.components = this.components.concat(components);
- } else {
- this.components = [].concat(components);
- }
+ this.components = this.components.concat(components);
for (var i = 0; i < components.length; i++) {
this.extendBounds(components[i].bounds);
More information about the Commits
mailing list