[Commits] r979 - apps/opengeo/geoexplorer/trunk/lib/GeoExplorer

commits at geoext.org commits at geoext.org
Wed Jun 3 22:24:17 CEST 2009


Author: sbenthall
Date: 2009-06-03 22:24:16 +0200 (Wed, 03 Jun 2009)
New Revision: 979

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
Log:
cleaning up the way the CapabilitiesGrid ensures the base layer ordering


Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-06-03 20:02:42 UTC (rev 978)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer/CapabilitiesGrid.js	2009-06-03 20:24:16 UTC (rev 979)
@@ -115,13 +115,10 @@
             } 
 
             record.set("background", !!base);
-            this.mapPanel.layers.add(record);
-            
-            if(base){
-                //enforce base layers on bottom
-                this.mapPanel.map.setLayerIndex(layer,0);
-                layer.events.triggerEvent("visibilitychanged");
-            }
+            this.mapPanel.layers.insert((base ? 
+                                         0 : 
+                                         this.mapPanel.layers.getCount()),
+                                        record);
         }
 
     }



More information about the Commits mailing list