[fusion-commits] r2481 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Dec 6 09:24:01 EST 2011
Author: jng
Date: 2011-12-06 06:24:01 -0800 (Tue, 06 Dec 2011)
New Revision: 2481
Modified:
trunk/widgets/Legend.js
Log:
Partial fix for #500. Tiled layers no longer have checkboxes shown. However this fix is partial because tiled themed layers are represented as folder nodes, which I have yet to figure out how to turn off checkboxes for (if it is possible)
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2011-12-05 16:02:51 UTC (rev 2480)
+++ trunk/widgets/Legend.js 2011-12-06 14:24:01 UTC (rev 2481)
@@ -609,11 +609,11 @@
style.legendLabel = layer.legendLabel;
}
if (!layer.legend.treeItem) {
- layer.legend.treeItem = this.createTreeItem(layer, style, fScale, true);
+ layer.legend.treeItem = this.createTreeItem(layer, style, fScale, !layer.isBaseMapLayer);
layer.parentGroup.legend.treeItem.add(layer.legend.treeItem);
} else if (layer.legend.treeItem instanceof Fusion.Widget.Legend.TreeFolder) {
this.clearTreeItem(layer);
- layer.legend.treeItem = this.createTreeItem(layer, style, fScale, true);
+ layer.legend.treeItem = this.createTreeItem(layer, style, fScale, !layer.isBaseMapLayer);
layer.parentGroup.legend.treeItem.add(layer.legend.treeItem);
} else {
if (range.styles.length > 0) {
@@ -636,7 +636,7 @@
layer.legend.treeItem = null;
}
} else {
- var newTreeItem = this.createTreeItem(layer, {legendLabel: layer.legendLabel}, null, true);
+ var newTreeItem = this.createTreeItem(layer, {legendLabel: layer.legendLabel}, null, !layer.isBaseMapLayer);
if (layer.legend.treeItem) {
layer.parentGroup.legend.treeItem.replace(newTreeItem, layer.legend.treeItem);
layer.legend.treeItem.finalize();
@@ -648,7 +648,8 @@
}
if (layer.legend.treeItem) {
layer.legend.treeItem.options.data = layer;
- layer.legend.treeItem.check(layer.visible);
+ if (!layer.isBaseMapLayer) //Tiled layers don't have a checkbox so there's nothing to check
+ layer.legend.treeItem.check(layer.visible);
}
},
getThemeExpandContextMenu: function(node) {
More information about the fusion-commits
mailing list