[Commits] r416 - sandbox/opengeo/geoexplorer/lib/GeoExt/widgets

commits at geoext.org commits at geoext.org
Fri Apr 17 23:53:25 CEST 2009


Author: dwins
Date: 2009-04-17 23:53:25 +0200 (Fri, 17 Apr 2009)
New Revision: 416

Modified:
   sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js
Log:
Narrow the search path to just children of the legend panel when trying to remove legend entries


Modified: sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js
===================================================================
--- sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js	2009-04-17 21:10:30 UTC (rev 415)
+++ sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js	2009-04-17 21:53:25 UTC (rev 416)
@@ -159,8 +159,8 @@
      */
     removeLayer: function(evt) {
         if (evt.layer && evt.layer instanceof OpenLayers.Layer.WMS) {
-            this.remove(Ext.getCmp(this.generatePanelId(evt.layer)));
-        }
+            this.remove(this.generatePanelId(evt.layer));
+        } 
     },
 
     /**
@@ -207,7 +207,6 @@
     },
 
     moveLegend: function(panel, layer, position){
-        var cfg = panel.initialConfig;
         this.remove(panel);
         var newPanel = this.createLegendPanel(
             this.generatePanelId(layer),



More information about the Commits mailing list