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

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Nov 6 06:27:21 PST 2013


Author: jng
Date: 2013-11-06 06:27:21 -0800 (Wed, 06 Nov 2013)
New Revision: 7899

Modified:
   trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
#2374: Fix OpenFlyout() not properly handling cases where it contains a separator. Patch by cbono, tweaked by me.

Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2013-11-06 14:20:49 UTC (rev 7898)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2013-11-06 14:27:21 UTC (rev 7899)
@@ -1196,11 +1196,17 @@
     for(var i = 0; i < items.length; i++)
     {
         var item = items[i];
-        var cmd = commands[item.cmdIndex];
-        var hasIcon = (cmd.icon != null);
-        var w = parent.tbFrame.MeasureText(item.name) + (hasIcon? 42: 26);
-        if (w > width)
-            width = w;
+        if (item)
+        {
+            var cmd = commands[item.cmdIndex];
+            if (cmd)
+            {
+                var hasIcon = (cmd.icon != null);
+                var w = parent.tbFrame.MeasureText(item.name) + (hasIcon? 42: 26);
+                if (w > width)
+                    width = w;
+            }
+        }
     }
     tbMenu = new MenuData(tbItem.htmlElt, 20, 21, 50, width,
                         "../stdicons/icon_popupscrollup.gif", "../stdicons/icon_popupscrollup_disabled.gif", "../stdicons/icon_popupscrolldown.gif", "../stdicons/icon_popupscrolldown_disabled.gif",



More information about the mapguide-commits mailing list