[fusion-commits] r1704 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Dec 4 10:42:02 EST 2008
Author: pdeschamps
Date: 2008-12-04 10:42:02 -0500 (Thu, 04 Dec 2008)
New Revision: 1704
Modified:
trunk/widgets/Legend.js
Log:
fixed issue with Layer MS_DEFAULT referenes bug#39
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2008-12-02 20:20:13 UTC (rev 1703)
+++ trunk/widgets/Legend.js 2008-12-04 15:42:02 UTC (rev 1704)
@@ -488,6 +488,7 @@
}
},
updateLayer: function(layer, fScale) {
+
if (!layer.displayInLegend) {
return;
}
@@ -602,7 +603,9 @@
},
createTreeItem: function(layer, style, scale, bCheckBox) {
var opt = {};
- if (bCheckBox) {
+ opt.statusIsDefault = layer.statusDefault;
+
+ if (bCheckBox ) {
opt.label = layer.legendLabel == '' ? ' ' : layer.legendLabel;
opt.draw = this.renderItemCheckBox;
} else {
@@ -621,7 +624,7 @@
} else {
opt.image = layer.oMap.getLegendImageURL(scale, layer, style);
}
-
+
var item = new Jx.TreeItem(opt);
item.contextMenu = this.getContextMenu(layer.parentGroup.legend.treeItem);
if (bCheckBox) {
@@ -697,6 +700,7 @@
},
renderItem: function() {
+
var domLabel = document.createElement('div');
domLabel.className = 'fusionLegendItem';
@@ -732,6 +736,13 @@
this.checkBox = document.createElement('input');
this.checkBox.type = 'checkbox';
+
+ /* layer is set to "status default" set checkbox to checked , disabled , read only*/
+ if(this.options.statusIsDefault){
+ this.checkBox.checked = true;
+ this.checkBox.disabled = true;
+ this.checkBox.readOnly = true;
+ }
this.domImg = document.createElement('img');
this.domImg.className = 'jxTreeIcon ' + (this.options.imageClass ? this.options.imageClass : '');
More information about the fusion-commits
mailing list