Menu

Vecta.Menu

Vecta.Menu object. Wrapper for a custom menu that can be attached to shapes.

NameTypeAttributesDescription
shapeVecta.Shape

The shape to add a menu to

indexnumberoptional

The index of the menu. If undefined, create a custom menu, otherwise use the menu at the provided index.

Methods

.action([action]) Returns: Vecta.Menu

Set or get the action to be performed when the option is clicked

NameTypeAttributesDescription
actionstringoptional

Valid JavaScript expression

Returns:

Returns the menu option

.delete()

Delete the menu options

.disable([disable]) Returns: Vecta.Menu

Set the option to be disabled or get the disable status of current menu

NameTypeAttributesDescription
disablestring|booleanoptional

Disabling of menu options. Can be a valid JavaScript expression supported by formula

Returns:

Returns the menu option

.select([select]) Returns: Vecta.Menu

Set the option to be selected or get the selected status of current menu

NameTypeAttributesDescription
selectstring|booleanoptional

Selecting of menu options. Can be a valid JavaScript expression supported by formula

Returns:

Returns the menu option

.title([title]) Returns: Vecta.Menu

Set or get the title of menu option

NameTypeAttributesDescription
titlestringoptional

Title of menu option. Can be a valid JavaScript expression supported by formula

Returns:

Returns the menu option