Interface: ContextMenuData

ContextMenuData

Properties:
Name Type Argument Description
$menu JQuery

The menu element for this menu part. Eg. the root menu, or a single submenu.

$layer JQuery

The opened layer when the menu is opened.

$node JQuery

The menu node.

$trigger JQuery

The element that triggered opening the menu.

$selected JQuery

Reference to the <li> command element.

$input JQuery

Reference to the <input> or <select> of the command element.

$label JQuery

Reference to the <input> or <select> of the command element.

ns string

The namespace (including leading dot) all events for this contextMenu instance were registered under.

manager ContextMenu

The contextmenu manager instance.

$selected JQuery | jQuery | null

Currently selected menu item, or input inside menu item.

hasTypes boolean <nullable>

The menu has ContextMenuItem which are of a selectable type.

isInput boolean <nullable>

We are currently originating events from an input.

inputs Object.<string, ContextMenuItem>

Inputs defined in the menu.

types Object.<string, ContextMenuItemTypeCallback>

Custom ContextMenuItemTypes, key is the ContextMenuItem type property, value is a ContextMenuItemTypeCallback callback.

hovering boolean

Currently hovering, root menu only.

Source:

Extends

Methods


determinePosition($menu)

Determine the position for a root menu.

Parameters:
Name Type Description
$menu JQuery
Inherited From:
Source:

position(e, currentMenuData, x, y)

Position the root menu.

Parameters:
Name Type Description
e JQuery.Event
currentMenuData ContextMenuData
x number | string
y number | string
Inherited From:
Source:

positionSubmenu(e, $menu)

Position a submenu.

Parameters:
Name Type Description
e JQuery.Event
$menu JQuery
Inherited From:
Source: