[fusion-commits] r1685 - in trunk: layers layers/MapGuide
layers/MapServer widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Nov 26 11:10:04 EST 2008
Author: madair
Date: 2008-11-26 11:10:04 -0500 (Wed, 26 Nov 2008)
New Revision: 1685
Modified:
trunk/layers/Layers.js
trunk/layers/MapGuide/MapGuide.js
trunk/layers/MapServer/MapServer.js
trunk/widgets/Legend.js
Log:
closes #168: convert true/false strings from LoadMap into booleans; add missing checkbox handler for initially out-of-scale layers
Modified: trunk/layers/Layers.js
===================================================================
--- trunk/layers/Layers.js 2008-11-25 20:27:42 UTC (rev 1684)
+++ trunk/layers/Layers.js 2008-11-26 16:10:04 UTC (rev 1685)
@@ -116,7 +116,9 @@
return maxExtent;
},
- hasSelection: function() { return this.bSelectionOn; },
+ hasSelection: function() {
+ return this.bSelectionOn;
+ },
/**
* Returns the number of features selected for this map layer
@@ -309,10 +311,10 @@
this.legendLabel = o.legendLabel;
this.parentUniqueId = o.parentUniqueId;
this.groupType = o.groupType;
- this.displayInLegend = o.displayInLegend;
- this.expandInLegend = o.expandInLegend;
- this.visible = o.visible;
- this.actuallyVisible = o.actuallyVisible;
+ this.displayInLegend = o.displayInLegend=="true"?true:false;
+ this.expandInLegend = o.expandInLegend=="true"?true:false;
+ this.visible = o.visible=="true"?true:false;
+ this.actuallyVisible = o.actuallyVisible=="true"?true:false;
this.registerEventID(Fusion.Event.GROUP_PROPERTY_CHANGED);
},
@@ -432,16 +434,16 @@
this.layerName = o.layerName;
this.uniqueId = o.uniqueId;
this.resourceId = o.resourceId;
- this.selectable = o.selectable;
+ this.selectable = o.selectable=="true"?true:false;
this.selectedFeatureCount = 0;
this.layerTypes = [].concat(o.layerTypes);
- this.visible = o.visible;
- this.actuallyVisible = o.actuallyVisible;
- this.editable = o.editable;
+ this.visible = o.visible=="true"?true:false;
+ this.actuallyVisible = o.actuallyVisible=="true"?true:false;
+ this.editable = o.editable=="true"?true:false;
this.legendLabel = o.legendLabel;
- this.displayInLegend = o.displayInLegend;
- this.expandInLegend = o.expandInLegend;
+ this.displayInLegend = o.displayInLegend=="true"?true:false;
+ this.expandInLegend = o.expandInLegend=="true"?true:false;
//determine the layer type so that the correct icon can be displayed in the legend
this.layerType = null;
Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2008-11-25 20:27:42 UTC (rev 1684)
+++ trunk/layers/MapGuide/MapGuide.js 2008-11-26 16:10:04 UTC (rev 1685)
@@ -207,6 +207,8 @@
this.layerRoot.clear();
this.layerRoot.legendLabel = this._sMapTitle;
+ this.layerRoot.displayInLegend = true;
+ this.layerRoot.expandInLegend = true;
this.parseMapLayersAndGroups(o);
Modified: trunk/layers/MapServer/MapServer.js
===================================================================
--- trunk/layers/MapServer/MapServer.js 2008-11-25 20:27:42 UTC (rev 1684)
+++ trunk/layers/MapServer/MapServer.js 2008-11-26 16:10:04 UTC (rev 1685)
@@ -183,6 +183,8 @@
this.layerRoot.clear();
this.layerRoot.legendLabel = this._sMapTitle;
+ this.layerRoot.displayInLegend = true;
+ this.layerRoot.expandInLegend = true;
this.parseMapLayersAndGroups(o);
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2008-11-25 20:27:42 UTC (rev 1684)
+++ trunk/widgets/Legend.js 2008-11-26 16:10:04 UTC (rev 1685)
@@ -473,7 +473,7 @@
$(this.currentNode.domObj.childNodes[1]).addClass('jxTreeItemSelected');
var data = o.domObj.retrieve('data');
- if (data instanceof Fusion.Widget.Map.Group) {
+ if (data instanceof Fusion.Layers.Group) {
this.getMap().setActiveLayer(null);
} else {
this.getMap().setActiveLayer(data);
@@ -556,6 +556,7 @@
}
} else {
var newTreeItem = this.createTreeItem(layer, null, null, this.bIncludeVisToggle);
+ OpenLayers.Event.observe(newTreeItem.checkBox, 'click', OpenLayers.Function.bind(this.stateChanged, this, layer));
if (layer.legend.treeItem) {
layer.legend.treeItem.checkBox.disabled = true;
layer.parentGroup.legend.treeItem.replace(newTreeItem, layer.legend.treeItem);
More information about the fusion-commits
mailing list