- determinePosition($menu)
Determine the position for a root menu
- position(e, opt, x, y)
Position the menu
- positionSubmenu(e, $menu)
Position a submenu
- inputLabel(node) ⇒
string|JQuery Get the input label for the given node
- setInputValues(opt, data)
import values into commands
- getInputValues(opt, data) ⇒
Object export values from commands
- zindex($t) ⇒
number - splitAccesskey(val) ⇒
Array Split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key
- html5builder(items, $children, counter) ⇒
number Helper function for building a menu from a HTML
element- execute(operation, options) ⇒
ContextMenu
- ContextMenuData :
ContextMenuSettings - ContextMenuItem :
Object - ContextMenuBuildCallback ⇒
Object.<string, ContextMenuItem> - ContextMenuSettings :
Object - ContextMenuEventHandlers :
Object - ContextMenuOperations :
Object
Kind: global class
Properties
| Name | Type |
|---|---|
| defaults | ContextMenuSettings |
| handle | ContextMenuEventHandlers |
| op | ContextMenuOperations |
| menus | Object.<string, ContextMenuData> |
| counter | number |
| initialized | boolean |
| initialized | boolean |
Determine the position for a root menu
Kind: global function
| Param | Type |
|---|---|
| $menu | JQuery |
Position the menu
Kind: global function
| Param | Type |
|---|---|
| e | JQuery.Event |
| opt | ContextMenuData |
| x | number | string |
| y | number | string |
Position a submenu
Kind: global function
| Param | Type |
|---|---|
| e | JQuery.Event |
| $menu | JQuery |
Get the input label for the given node
Kind: global function
| Param |
|---|
| node |
import values into commands
Kind: global function
| Param | Type |
|---|---|
| opt | ContextMenuData |
| data | Object |
export values from commands
Kind: global function
| Param | Type |
|---|---|
| opt | ContextMenuData |
| data | Object |
Kind: global function
| Param | Type |
|---|---|
| $t | JQuery |
Split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key
Kind: global function
| Param | Type |
|---|---|
| val | string |
Helper function for building a menu from a HTML
elementKind: global function
| Param | Type |
|---|---|
| items | Object.<string, ContextMenuItem> |
| $children | JQuery |
| counter | number |
execute(operation, options) ⇒ ContextMenu
Kind: global function
| Param | Type |
|---|---|
| operation | string | ContextMenuSettings |
| options | string | ContextMenuSettings |
ContextMenuData : ContextMenuSettings
Kind: global typedef
Properties
| Name | Type | 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 item node |
| $trigger | JQuery |
The element that triggered opening the menu |
| $selected | JQuery | null |
Currently selected menu item, or input inside menu item |
| hasTypes | boolean |
The menu has ContextMenuItem which are of a selectable type |
| hovering | boolean |
Currently hovering, root menu only. |
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| type | string |
|
| icon | string | function |
|
| isHtmlName | boolean |
Should this item be called with .html() instead of .text() |
| items | Object.<string, ContextMenuItem> |
Kind: global typedef
| Param | Type | Description |
|---|---|---|
| e | JQuery.Event |
Event that trigged the menu |
| $currentTrigger | JQuery |
Element that trigged the menu |
Kind: global typedef
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| selector | null | string |
selector of contextMenu trigger | |
| appendTo | null | string |
where to append the menu to | |
| trigger | string |
"left" |
method to trigger context menu ["right", "left", "hover"] |
| autoHide | boolean |
true |
hide menu when mouse leaves trigger / menu elements |
| delay | number |
200 |
ms to wait before showing a hover-triggered context menu |
| reposition | boolean |
true |
flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu as long as the trigger happened on one of the trigger-element's child nodes |
| hideOnSecondTrigger | boolean |
false |
Flag denoting if a second trigger should close the menu, as long as the trigger happened on one of the trigger-element's child nodes. This overrides the reposition option. |
| selectableSubMenu | boolean |
false |
ability to select submenu |
| className | string |
Class to be appended to the root menu. | |
| classNames | Object |
Default classname configuration to be able avoid conflicts in frameworks | |
| classNames.hover | string |
"context-menu-hover" |
|
| classNames.disabled | string |
"context-menu-disabled" |
|
| classNames.visible | string |
"context-menu-visible" |
|
| classNames.notSelectable | string |
"context-menu-not-selectable" |
|
| classNames.icon | string |
"context-menu-icon" |
|
| classNames.iconEdit | string |
"context-menu-icon-edit" |
|
| classNames.iconCut | string |
"context-menu-icon-cut" |
|
| classNames.iconCopy | string |
"context-menu-icon-copy" |
|
| classNames.iconPaste | string |
"context-menu-icon-paste" |
|
| classNames.iconDelete | string |
"context-menu-icon-delete" |
|
| classNames.iconAdd | string |
"context-menu-icon-add" |
|
| classNames.iconQuit | string |
"context-menu-icon-quit" |
|
| classNames.iconLoadingClass | string |
"context-menu-icon-loading" |
|
| zIndex | number |
1 |
offset to add to zIndex |
| animation | Object |
Animation settings | |
| animation.duration | number |
50, |
|
| animation.show | string |
"'slideDown'" |
|
| animation.hide | string |
"'slideUp'" |
|
| events | Object |
Event callbacks | |
| events.show | function |
||
| events.hide | function |
||
| events.activated | function |
||
| callback | function |
||
| determinePosition | determinePosition | function |
||
| position | position | function |
||
| positionSubmenu | positionSubmenu | function |
||
| items | Object.<string, ContextMenuItem> |
||
| build | ContextMenuBuildCallback |
false |
Kind: global typedef
Properties
| Name | Type |
|---|---|
| $currentTrigger | JQuery |
| hoveract | Object |
Kind: global typedef
Properties
| Name | Type |
|---|---|
| handle | Object |