[mapguide-commits] r6843 - trunk/MgDev/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jul 3 05:51:39 PDT 2012


Author: jng
Date: 2012-07-03 05:51:39 -0700 (Tue, 03 Jul 2012)
New Revision: 6843

Modified:
   trunk/MgDev/Web/src/viewerfiles/legendui.templ
Log:
#1318: Fix GetLayers(true, false) to only return visible layers in the current view scale

Modified: trunk/MgDev/Web/src/viewerfiles/legendui.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/legendui.templ	2012-07-03 12:40:28 UTC (rev 6842)
+++ trunk/MgDev/Web/src/viewerfiles/legendui.templ	2012-07-03 12:51:39 UTC (rev 6843)
@@ -1071,14 +1071,14 @@
         var node = nodes[i];
         if(node.type == 0)
         {
-            if(onlyVisible && !node.visible)
+            if(onlyVisible && (!node.visible || node.curScale == -1))
                 continue;
             if(node.children != null && node.children.length > 0)
                 DoGetLayers(node.children, layers, onlyVisible, onlySelectable);
         }
         else if(node.type == 1)
         {
-            if(onlyVisible && !node.visible)
+            if(onlyVisible && (!node.visible || node.curScale == -1))
                 continue;
             if(onlySelectable && !node.selectable)
                 continue;



More information about the mapguide-commits mailing list