Options
All
  • Public
  • Public/Protected
  • All
Menu
example
graph.getSelectionModel().addListener(mxEvent.CHANGE, function(sender, evt)
{
  var cells = evt.getProperty('added');

  for (var i = 0; i < cells.length; i++)
  {
    // Handle cells[i]...
  }
});

Event: mxEvent.UNDO

Fires after the selection was changed in changeSelection. The edit property contains the mxUndoableEdit which contains the mxSelectionChange.

Event: mxEvent.CHANGE

Fires after the selection changes by executing an mxSelectionChange. The added and removed properties contain arrays of cells that have been added to or removed from the selection, respectively. The names are inverted due to historic reasons. This cannot be changed.

Hierarchy

Index

Constructors

constructor

Properties

doneResource

doneResource: "" | "done"

Specifies the resource key for the status message after a long operation. If the resource for this key does not exist then the value is used as the status message. Default is 'done'.

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.

graph

graph: mxGraph

Reference to the enclosing mxGraph.

singleSelection

singleSelection: boolean

Specifies if only one selected item at a time is allowed. Default is false.

updatingSelectionResource

updatingSelectionResource: "" | "updatingSelection"

Specifies the resource key for the status message while the selection is being updated. If the resource for this key does not exist then the value is used as the status message. Default is 'updatingSelection'.

Methods

addCell

addCells

  • addCells(cells: mxCell[]): void

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

cellAdded

  • cellAdded(cell: mxCell): void

cellRemoved

  • cellRemoved(cell: mxCell): void

changeSelection

clear

  • clear(): 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

getFirstSelectableCell

isEmpty

  • isEmpty(): boolean

isEventsEnabled

  • isEventsEnabled(): boolean

isSelected

  • isSelected(cell: mxCell): boolean

isSingleSelection

  • isSingleSelection(): boolean

removeCell

  • removeCell(cell: mxCell): void

removeCells

  • removeCells(cells: mxCell[]): 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

setCell

setCells

  • setCells(cells: mxCell[]): void

setEventSource

  • setEventSource(value: any): void

setEventsEnabled

  • setEventsEnabled(value: boolean): void

setSingleSelection

  • setSingleSelection(singleSelection: boolean): void

Generated using TypeDoc