Add edge context menu items

Add menu items to the context menu of edges.

Pass the string DIVIDER to place a divider in the menu


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, edgeId, DomElement, and edge as parameters

submenu array.<object> <optional>

The submenu to open on hover

canHandle function <optional>

Should the item be place given currentSelection and edge parameters.

selection number <optional>

Automatically enable or disable based on the targeted number of edges

options object <optional>
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;