[fusion-commits] r2202 - trunk/layers

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu Aug 12 14:18:11 EDT 2010


Author: madair
Date: 2010-08-12 18:18:11 +0000 (Thu, 12 Aug 2010)
New Revision: 2202

Modified:
   trunk/layers/Layers.js
Log:
closes #313: fix legend checkbox references

Modified: trunk/layers/Layers.js
===================================================================
--- trunk/layers/Layers.js	2010-08-12 17:50:56 UTC (rev 2201)
+++ trunk/layers/Layers.js	2010-08-12 18:18:11 UTC (rev 2202)
@@ -327,9 +327,9 @@
             return;
         }
         this.oMap.showGroup(this, noDraw ? true : false);
-        this.visible = true;
-        if (this.legend && this.legend.checkBox) {
-            this.legend.checkBox.checked = true;
+        this.set('visible', true);
+        if (this.legend && this.legend.treeItem && this.legend.treeItem.checkBox) {
+            this.legend.treeItem.checkBox.checked = true;
         }
     },
 
@@ -338,9 +338,9 @@
             return;
         }
         this.oMap.hideGroup(this, noDraw ? true : false);
-        this.visible = false;
-        if (this.legend && this.legend.checkBox) {
-            this.legend.checkBox.checked = false;
+        this.set('visible', false);
+        if (this.legend && this.legend.treeItem && this.legend.treeItem.checkBox) {
+            this.legend.treeItem.checkBox.checked = false;
         }
     },
 
@@ -504,8 +504,8 @@
         }
         this.set('visible', true);
         this.oMap.showLayer(this, noDraw ? true : false);
-        if (this.legend && this.legend.checkBox) {
-            this.legend.checkBox.checked = true;
+        if (this.legend && this.legend.treeItem && this.legend.treeItem.checkBox) { 
+            this.legend.treeItem.checkBox.checked = true;
         }
     },
 
@@ -515,8 +515,8 @@
         }
         this.set('visible',false);
         this.oMap.hideLayer(this, noDraw ? true : false);
-        if (this.legend && this.legend.checkBox) {
-            this.legend.checkBox.checked = false;
+        if (this.legend && this.legend.treeItem && this.legend.treeItem.checkBox) { 
+            this.legend.treeItem.checkBox.checked = false;
         }
     },
 



More information about the fusion-commits mailing list