(name: MenuActionType)
| 93 | } |
| 94 | |
| 95 | getMenu(name: MenuActionType) { |
| 96 | const contain = this.act.getKeys(name); |
| 97 | const menu = new Menu(); |
| 98 | contain.forEach((id) => { |
| 99 | const action = this.act.getAction(id); |
| 100 | const menuItem = this.actionToMenuItem(action); |
| 101 | menu.append(new MenuItem(menuItem)); |
| 102 | }); |
| 103 | return menu; |
| 104 | } |
| 105 | |
| 106 | openMenu(name: MenuActionType) { |
| 107 | this.getMenu(name).popup({}); |