[mapguide-commits] r7898 - branches/2.5/MgDev/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Nov 6 06:20:50 PST 2013


Author: jng
Date: 2013-11-06 06:20:49 -0800 (Wed, 06 Nov 2013)
New Revision: 7898

Modified:
   branches/2.5/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: branches/2.5/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- branches/2.5/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2013-11-04 10:32:13 UTC (rev 7897)
+++ branches/2.5/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2013-11-06 14:20:49 UTC (rev 7898)
@@ -1187,11 +1187,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