[Commits] r948 - in sandbox/opengeo/geoexplorer: . lib/GeoExt/widgets
commits at geoext.org
commits at geoext.org
Tue Jun 2 20:32:35 CEST 2009
Author: sbenthall
Date: 2009-06-02 20:32:35 +0200 (Tue, 02 Jun 2009)
New Revision: 948
Modified:
sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js
sandbox/opengeo/geoexplorer/modifications.txt
Log:
temporary change to LegendPanel
Modified: sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js
===================================================================
--- sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js 2009-06-02 18:25:50 UTC (rev 947)
+++ sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/LegendPanel.js 2009-06-02 18:32:35 UTC (rev 948)
@@ -124,16 +124,19 @@
*/
onStoreUpdate: function(store, record, operation) {
var layer = record.get('layer');
- var legend = this.getComponent(layer.id);
- if (legend) {
- legend.setVisible(layer.getVisibility() &&
- layer.displayInLayerSwitcher && !record.get('hideInLegend'));
- if (record.get('legendURL')) {
- var items = legend.findByType('gx_legendimage');
- for (var i=0, len=items.length; i<len; i++) {
- items[i].setUrl(record.get('legendURL'));
- }
- }
+
+ if(this.items){
+ var legend = this.getComponent(layer.id);
+
+ if (legend) {
+ legend.setVisible(layer.getVisibility() &&
+ layer.displayInLayerSwitcher && !record.get('hideInLegend'));
+ if (record.get('legendURL')) {
+ var items = legend.findByType('gx_legendimage');
+ for (var i=0, len=items.length; i<len; i++) {
+ items[i].setUrl(record.get('legendURL'));
+ }
+ }}
}
},
Modified: sandbox/opengeo/geoexplorer/modifications.txt
===================================================================
--- sandbox/opengeo/geoexplorer/modifications.txt 2009-06-02 18:25:50 UTC (rev 947)
+++ sandbox/opengeo/geoexplorer/modifications.txt 2009-06-02 18:32:35 UTC (rev 948)
@@ -13,4 +13,5 @@
* (#79) WMSCapabilitiesStore assumes config parameter
+* change to LegendPanel's onStoreUpdate method to stop it from exploding. This introduces a bug, however. So, hopefully a temporary change until we figure out how to fix both problems.
More information about the Commits
mailing list