Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

autoExpand

autoExpand: boolean

Variable: autoExpand

Specifies if submenus should be expanded on mouseover. Default is false.

enabled

enabled: boolean

Variable: enabled

Specifies if events are handled. Default is true.

eventListeners

eventListeners: any[]

Variable: eventListeners

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.

eventSource

eventSource: any

Variable: eventSource

Optional source for events. Default is null.

eventsEnabled

eventsEnabled: boolean

Variable: eventsEnabled

Specifies if events can be fired. Default is true.

factoryMethod

factoryMethod: (handler: mxPopupMenuHandler, cell: mxCell, me: mxMouseEvent) => any

Variable: factoryMethod

Function that is used to create the popup menu. The function takes the current panning handler, the under the mouse and the mouse event that triggered the call as arguments.

Type declaration

itemCount

itemCount: number

Variable: itemCount

Contains the number of times has been called for a new menu.

labels

labels: boolean

Variable: labels

Specifies if any labels should be visible. Default is true.

smartSeparators

smartSeparators: boolean

Variable: smartSeparators

Specifies if separators should only be added if a menu item follows them. Default is false.

submenuImage

submenuImage: string

Variable: submenuImage

URL of the image to be used for the submenu icon.

useLeftButtonForPopup

useLeftButtonForPopup: boolean

Variable: useLeftButtonForPopup

Specifies if popupmenus should be activated by clicking the left mouse button. Default is false.

zIndex

zIndex: number

Variable: zIndex

Specifies the zIndex for the popupmenu and its shadow. Default is 1006.

Methods

addCheckmark

  • addCheckmark(item: Element, img: string): void
  • Adds a checkmark to the given menuitem.

    Parameters

    • item: Element
    • img: string

    Returns void

addItem

  • addItem(title: string, image?: string, funct?: (me: mxMouseEvent) => void, parent?: Element, iconCls?: string, enabled?: boolean, active?: boolean): Element
  • Function: addItem

    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 . iconCls - Optional string that represents the CSS class for the image icon. IconsCls is ignored if image is given. enabled - Optional boolean indicating if the item is enabled. Default is true. active - Optional boolean indicating if the menu should implement any event handling. Default is true.

    Parameters

    • title: string
    • Optional image: string
    • Optional funct: (me: mxMouseEvent) => void
    • Optional parent: Element
    • Optional iconCls: string
    • Optional enabled: boolean
    • Optional active: boolean

    Returns Element

addListener

  • addListener(name: string, funct: (...args: any[]) => any): void
  • Function: addListener

    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 .

    Parameters

    • name: string
    • funct: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns void

addSeparator

  • addSeparator(parent?: Element, force?: boolean): void
  • Function: addSeparator

    Adds a horizontal separator in the given parent item or the top-level menu if no parent is specified.

    Parameters:

    parent - Optional item returned by . force - Optional boolean to ignore . Default is false.

    Parameters

    • Optional parent: Element
    • Optional force: boolean

    Returns void

createSubmenu

  • createSubmenu(parent: Element): void
  • Function: createSubmenu

    Creates the nodes required to add submenu items inside the given parent item. This is called in if a parent item is used for the first time. This adds various DOM nodes and a to the parent.

    Parameters:

    parent - An item returned by .

    Parameters

    • parent: Element

    Returns void

destroy

  • destroy(): void
  • Function: destroy

    Destroys the handler and all its resources and DOM nodes.

    Returns void

fireEvent

  • Function: fireEvent

    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 <mxUtils.bind>).

    Example:

    (code) fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN)) (end)

    Parameters:

    evt - that represents the event. sender - Optional sender to be passed to the listener. Default value is the return value of .

    Parameters

    Returns void

getEventSource

  • getEventSource(): any

hideMenu

  • hideMenu(): void

hideSubmenu

  • hideSubmenu(parent: Element): void
  • Function: hideSubmenu

    Removes all submenus inside the given parent.

    Parameters:

    parent - An item returned by .

    Parameters

    • parent: Element

    Returns void

init

  • init(): void
  • Function: init

    Initializes the shapes required for this vertex handler.

    Returns void

isEnabled

  • isEnabled(): boolean
  • Function: isEnabled

    Returns true if events are handled. This implementation returns .

    Returns boolean

isEventsEnabled

  • isEventsEnabled(): boolean

isMenuShowing

  • isMenuShowing(): boolean

isPopupTrigger

  • Function: isPopupTrigger

    Returns true if the given event is a popupmenu trigger for the optional given cell.

    Parameters:

    me - that represents the mouse event.

    Parameters

    Returns boolean

popup

  • popup(x: number, y: number, cell: mxCell, evt: Event): void
  • Function: popup

    Shows the popup menu for the given event and cell.

    Example:

    (code) graph.panningHandler.popup(x, y, cell, evt) { mxUtils.alert('Hello, World!'); } (end)

    Parameters

    • x: number
    • y: number
    • cell: mxCell
    • evt: Event

    Returns void

removeListener

  • removeListener(funct: (...args: any[]) => any): void
  • Function: removeListener

    Removes all occurrences of the given listener from .

    Parameters

    • funct: (...args: any[]) => any
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns void

setEnabled

  • setEnabled(enabled: boolean): void
  • Function: setEnabled

    Enables or disables event handling. This implementation updates .

    Parameters

    • enabled: boolean

    Returns void

setEventSource

  • setEventSource(value: any): void

setEventsEnabled

  • setEventsEnabled(value: boolean): void

showMenu

  • showMenu(): void

showSubmenu

  • showSubmenu(parent: Element, row: Element): void
  • Function: showSubmenu

    Shows the submenu inside the given parent row.

    Parameters

    • parent: Element
    • row: Element

    Returns void

Generated using TypeDoc