Specifies if submenus should be expanded on mouseover. Default is false.
Specifies if events are handled. Default is true.
Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.
Optional source for events. Default is null.
Specifies if events can be fired. Default is true.
Function that is used to create the popup menu. The function takes the
current panning handler, the
Contains the number of times
Specifies if any labels should be visible. Default is true.
Specifies if separators should only be added if a menu item follows them. Default is false.
URL of the image to be used for the submenu icon.
Specifies if popupmenus should be activated by clicking the left mouse button. Default is false.
Specifies the zIndex for the popupmenu and its shadow. Default is 1006.
Adds a checkmark to the given menuitem.
Adds the given item to the given parent item. If no parent item is specified then the item is added to the top-level menu. The return value may be used as the parent argument, ie. as a submenu item. The return value is the table row that represents the item.
Paramters:
title - String that represents the title of the menu item.
image - Optional URL for the image icon.
funct - Function associated that takes a mouseup or touchend event.
parent - Optional item returned by
Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.
The parameters of the listener are the sender and an EventObject.
Adds a horizontal separator in the given parent item or the top-level menu if no parent is specified.
Optional item returned by
Optional boolean to ignore
Creates the nodes required to add submenu items inside the given parent
item. This is called in
An item returned by
Destroys the handler and all its resources and DOM nodes.
Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation (see {@link Utils#bind}).
Example:
fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN))
EventObject that represents the event.
Optional sender to be passed to the listener. Default value is
the return value of
Returns
Removes the menu and all submenus.
Removes all submenus inside the given parent.
An item returned by
Returns true if events are handled. This implementation
returns
Returns
Returns true if the menu is showing.
Returns true if the given event is a popupmenu trigger for the optional given cell.
{@link MouseEvent} that represents the mouse event.
Shows the popup menu for the given event and cell.
Example:
graph.getPlugin('PanningHandler').popup(x, y, cell, evt)
{
mxUtils.alert('Hello, World!');
}
Removes all occurrences of the given listener from
Enables or disables event handling. This implementation
updates
Sets
Sets
Shows the menu.
Shows the submenu inside the given parent row.
Generated using TypeDoc
Basic popup menu. To add a vertical scrollbar to a given submenu, the following code can be used.
Constructor: mxPopupMenu
Constructs a popupmenu.
Event: mxEvent.SHOW
Fires after the menu has been shown in.