Adds context menu functionality.
- License:
- Apache-2.0
- Source:
Methods
(static) add(menuItem) → {void}
Parameters:
Name | Type | Description |
---|---|---|
menuItem |
module:contextmenu.MenuItem |
- Source:
Throws:
Error
|
TypeError
Returns:
- Type
- void
(static) getCustomHandler(handlerKey) → {module:contextmenu.MenuItemAction}
Parameters:
Name | Type | Description |
---|---|---|
handlerKey |
string |
- Source:
Returns:
(static) hasCustomHandler(handlerKey) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
handlerKey |
string |
- Source:
Returns:
- Type
- boolean
(static) injectExtendedContextMenuItemsIntoDom() → {void}
- Source:
Returns:
- Type
- void
(static) resetCustomMenus() → {void}
- Source:
Returns:
- Type
- void
(inner) injectExtendedContextMenuItemIntoDom(menuItem) → {void}
Parameters:
Name | Type | Description |
---|---|---|
menuItem |
module:contextmenu.MenuItem |
- Source:
Returns:
- Type
- void
(inner) menuItemIsValid(menuItem) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
menuItem |
module:contextmenu.MenuItem |
- Source:
Returns:
- Type
- boolean
Type Definitions
MenuItem
Type:
Properties:
Name | Type | Description |
---|---|---|
id |
string | |
label |
string | |
action |
module:contextmenu.MenuItemAction |
- Source:
MenuItemAction(…args) → {any}
Signature depends on what the user adds; in the case of our uses with SVGEditor, no parameters are passed nor anything expected for a return.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
args |
<repeatable> |
- Source:
Returns:
- Type
- any