SmartClient Version: v12.0p_2019-04-23/LGPL Development Only (built 2019-04-23)
Browser: Google Chrome Version 74.0.3729.108 (Official Build) (64-bit)
OS: Linux 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64
For menus built from Tree data (test1), the primary menu does animate, but sub/child menus do not.
In menus built manually (test2), all nested menus also animate.
Is there something I can do to enable submenu animation for Tree menus besides manually composing the menu from the data?
Example:
My load_skin.js enables the "wipe" animation:
Browser: Google Chrome Version 74.0.3729.108 (Official Build) (64-bit)
OS: Linux 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64
For menus built from Tree data (test1), the primary menu does animate, but sub/child menus do not.
In menus built manually (test2), all nested menus also animate.
Is there something I can do to enable submenu animation for Tree menus besides manually composing the menu from the data?
Example:
Code:
public class TestWindow extends Window { TestWindow() { setWidth(400); setHeight(400); final MenuButton b = new MenuButton("test1"); final Menu m = new Menu(); m.setData(getLocalItemsAsTree()); b.setMenu(m); addItem(b); final MenuButton b2 = new MenuButton("test2"); b2.setMenu(buildMenu2()); addItem(b2); } private static Tree getLocalItemsAsTree() { Tree retVal = new Tree(); TreeNode[] treeNodes = new TreeNode[4]; treeNodes[0] = new TreeNode("Marketing"); Tree menuMarketing = new Tree(); menuMarketing.setData(new TreeNode[] { new TreeNode("Advertising"), new TreeNode("Community Relations") }); treeNodes[0].setChildren(menuMarketing.getAllNodes()); treeNodes[1] = new TreeNode("Sales"); Tree menuSales = new Tree(); menuSales.setData(new TreeNode[] { new TreeNode("Direct Sales"), new TreeNode("Channel Sales") }); treeNodes[1].setChildren(menuSales.getAllNodes()); treeNodes[2] = new TreeNode("Manufacturing"); Tree menuManufacturing = new Tree(); menuManufacturing.setData(new TreeNode[] { new TreeNode("Design"), new TreeNode("Development"), new TreeNode( "QA") }); treeNodes[2].setChildren(menuManufacturing.getAllNodes()); treeNodes[3] = new TreeNode("Services"); Tree menuServices = new Tree(); menuServices.setData(new TreeNode[] { new TreeNode("Support"), new TreeNode("Consulting") }); treeNodes[3].setChildren(menuServices.getAllNodes()); retVal.setData(treeNodes); return retVal; } private static Menu buildMenu2() { final Menu submenu2 = new Menu(); submenu2.setItems(new MenuItem("Advertising subitem 1"), new MenuItem("Advertising subitem 2")); final MenuItem adv = new MenuItem("Advertising"); adv.setSubmenu(submenu2); final Menu submenu1 = new Menu(); submenu1.setItems(adv, new MenuItem("Community Relations")); final MenuItem item1 = new MenuItem("Marketing"); item1.setSubmenu(submenu1); final Menu rv = new Menu(); rv.setItems(item1); return rv; } }
Code:
isc.Menu.addProperties({ bodyBackgroundColor:null, bodyStyleName:"menuBody", cellHeight:26, showEdges:false, checkmarkDisabledImage:{src:"[SKIN]check_disabled.png", width:7, height:6}, checkmarkImage:{src:"[SKIN]check.png", width:9, height:8}, fastCellUpdates:false, iconBodyStyleName:"menuMain", shadowDepth:5, showShadow:false, submenuDisabledImage:{src:"[SKIN]submenu_disabled.png", height:12, width:7}, submenuImage:{src:"[SKIN]submenu.png", height:12, width:7}, showAnimationEffect:"wipe" });
Comment