org.visallo.vertex.menu

Add vertex context menu items

Add menu items to the context menu of vertices.

Pass the string DIVIDER to place a divider in the menu

Registration

Source:
Tutorials:
See:
Configuration Properties:
Name Type Attributes Description
label string

The menu text to display

event string

The event to trigger on click, not required if submenu is provided

shortcut string <optional>

string of shortcut to show in menu. Doesn't actually listen for shortcut, just places the text in the label. For example, alt+p

args object <optional>

Additional arguments passed to handler

cls string <optional>

CSS classname added to item

shouldDisable function <optional>

Given the selection, vertexId, DomElement, and vertex as parameters

submenu array.<object> <optional>

The submenu to open on hover

canHandle function <optional>

Should the item be place given currentSelection and vertex parameters.

selection number <optional>

Automatically enable or disable based on the targeted number of vertices

options object <optional>
Properties
Name Type Attributes Description
insertIntoMenuItems function <optional>

function to place the item in a specific location/order, given item and items.

Syntax similar to org.visallo.detail.toolbar~insertIntoMenuItems

Validation Function

Extensions registered must pass this validation check to be used.

function extensionValidator(e) {
    return e === 'DIVIDER' || ('event' in e || 'submenu' in e) && 'label' in e;
}