MenuItem

MenuSystem. MenuItem

Represents a MenuItem in the MenuSystem

Constructor

Source:
Construct a new MenuItem
Parameters:
Name Type Description
builder MenuSystem.MenuBuilder
menu MenuSystem.Menu
config MenuSystem.MenuItem~menuItemConfig

Members

html :Element

Source:
The DOM Element of this MenuItem
Type:
  • Element

Methods

destroy()

Source:
Destroys this MenuItem

Type Definitions

menuItemConfig

Source:
Properties:
Name Type Attributes Default Description
label String <optional>
The label of this MenuItem
icon * <optional>
The icon of this MenuItem
order Number <optional>
99999 The order of this MenuItem
onAction function <optional>
The callback to call when this MenuItem has its action triggered
onOpen function <optional>
Called when the Menu this MenuItem belongs to is about to open. If false is returned, this MenuItem will not be shown.
submenu MenuSystem.Menu <optional>
null A submenu to open when clicking this MenuItem
submenuOnHover boolean <optional>
true Determines if this MenuItem's submenu should open on hover
group String <optional>
The group this MenuItem should belong too
groupOrder Number <optional>
99999 If this MenuItem is part of a group, this is the order the group should have. (The lowest order of all members is choosen)
Type:
  • Object