[OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #850: typo in Collection.calculateBounds()

Christopher Schmidt crschmidt at metacarta.com
Thu Jul 19 09:18:32 EDT 2007


Erik, can you review this one? 'svn blame' says it belongs to you, and
it looks like it was part of r2370:

-    getBounds: function () {
-        if (!this.bounds) {
-            for (var i = 0; i < this.components.length; i++) {
+    calculateBounds: function() {
+        this.bounds = null;
+        if ( !this.components || (this.components.length > 0)) {
+            this.setBounds(this.components[0].getBounds());
+            for (var i = 1; i < this.components.length; i++) {

It certainly 'feels' wrong to me.


-- Chris

On Thu, Jul 19, 2007 at 01:08:56PM -0000, OpenLayers wrote:
> #850: typo in Collection.calculateBounds()
> ---------------------+------------------------------------------------------
>  Reporter:  pgiraud  |       Owner:     
>      Type:  feature  |      Status:  new
>  Priority:  minor    |   Milestone:     
> Component:  general  |     Version:  2.4
>  Keywords:           |  
> ---------------------+------------------------------------------------------
>  It is likely that there is a little typo in the calculateBounds in the
>  Geometry.Collection class.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list