Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SelectionCellsHandler

An event handler that manages cell handlers and invokes their mouse event processing functions.

Group: Events

Event: mxEvent.ADD

Fires if a cell has been added to the selection. The state property contains the that has been added.

Event: mxEvent.REMOVE

Fires if a cell has been remove from the selection. The state property contains the that has been removed.

param graph

Reference to the enclosing Graph.

Hierarchy

Implements

  • GraphPlugin

Index

Constructors

constructor

Properties

enabled

enabled: boolean = true

Specifies if events are handled. Default is true.

eventListeners

eventListeners: EventListenerObject[] = []

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: null | EventTarget = null

Optional source for events. Default is null.

eventsEnabled

eventsEnabled: boolean = true

Specifies if events can be fired. Default is true.

graph

graph: Graph

Reference to the enclosing Graph.

handlers

Dictionary that maps from cells to handlers.

maxHandlers

maxHandlers: number = 100

Defines the maximum number of handlers to paint individually. Default is 100.

refreshHandler

refreshHandler: (sender: EventSource, evt: EventObject) => void

Type declaration

Static pluginId

pluginId: string = 'SelectionCellsHandler'

Methods

addListener

  • addListener(name: string, funct: Function): void
  • 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.

    Parameters

    • name: string
    • funct: Function

    Returns void

fireEvent

  • fireEvent(evt: EventObject, sender?: null | EventTarget): void
  • 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))
    

    Parameters

    • evt: EventObject

      EventObject that represents the event.

    • sender: null | EventTarget = null

      Optional sender to be passed to the listener. Default value is the return value of .

    Returns void

getEventSource

  • getEventSource(): null | EventTarget

getHandledSelectionCells

getHandler

isEnabled

  • isEnabled(): boolean

isEventsEnabled

  • isEventsEnabled(): boolean

isHandled

  • isHandled(cell: Cell): boolean

isHandlerActive

mouseDown

mouseMove

mouseUp

onDestroy

  • onDestroy(): void

refresh

  • refresh(): void

removeListener

  • removeListener(funct: Function): void

reset

  • reset(): void

setEnabled

  • setEnabled(value: boolean): void

setEventSource

  • setEventSource(value: null | EventTarget): void

setEventsEnabled

  • setEventsEnabled(value: boolean): void

updateHandler

Generated using TypeDoc