[fusion-commits] r2107 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Mar 24 21:56:40 EDT 2010
Author: liuar
Date: 2010-03-24 21:56:38 -0400 (Wed, 24 Mar 2010)
New Revision: 2107
Modified:
trunk/widgets/Legend.js
Log:
Fixed ticket #306 Legend panel is empty with Raster/WMS data source
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2010-03-24 19:21:37 UTC (rev 2106)
+++ trunk/widgets/Legend.js 2010-03-25 01:56:38 UTC (rev 2107)
@@ -633,7 +633,7 @@
}
if (checkbox) {
layer.legend.treeItem.checkBox.checked = layer.visible?true:false;
- if (layer.layerTypes[0] == 4 || range.styles.length > 0) {
+ if (layer.layerTypes[0] == 4 || layer.layerTypes[0] == 5 || range.styles.length > 0) {
layer.legend.treeItem.checkBox.disabled = false;
} else {
layer.legend.treeItem.checkBox.disabled = true;
@@ -728,13 +728,13 @@
}
}
// MapGuide DWF and Raster layer
- if (layer.layerTypes[0] == 4) {
- if (style && style.staticIcon == Fusion.Constant.LAYER_DWF_TYPE) {
- opt.image = this.imgLayerDWFIcon;
- } else {
- opt.image = this.imgLayerRasterIcon;
- }
+ // MapGuide Raster and DWF layer
+ if(layer.layerTypes[0] == 4){
+ opt.image = this.imgLayerRasterIcon;
opt.enabled = true;
+ } else if(layer.layerTypes[0] == 5){
+ opt.image = this.imgLayerDWFIcon;
+ opt.enabled = true;
}
opt.contextMenu = this.getContextMenu();
More information about the fusion-commits
mailing list