Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LayoutManager

Hierarchy

Index

Constructors

constructor

Properties

bubbling

bubbling: boolean = true

Specifies if the layout should bubble along the cell hierarchy.

default

true

enabled

enabled: boolean = true

Specifies if event handling is enabled.

default

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.

moveHandler

moveHandler: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Holds the function that handles the move event.

      Parameters

      • Rest ...args: any[]

      Returns any

resizeHandler

resizeHandler: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Holds the function that handles the resize event.

      Parameters

      • Rest ...args: any[]

      Returns any

undoHandler

undoHandler: (...args: any[]) => any

Type declaration

    • (...args: any[]): any
    • Holds the function that handles the endUpdate event.

      Parameters

      • Rest ...args: any[]

      Returns any

Methods

addAncestorsWithLayout

addCellsWithLayout

addDescendantsWithLayout

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

beforeUndo

cellsMoved

  • cellsMoved(cells: CellArray, evt: MouseEvent): void

cellsResized

destroy

  • destroy(): void

executeLayout

  • executeLayout(cell: Cell, bubble?: boolean): void

executeLayoutForCells

  • executeLayoutForCells(cells: CellArray): 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

getCellsForChange

getCellsForChanges

  • getCellsForChanges(changes: any[]): CellArray

getEventSource

  • getEventSource(): null | EventTarget

getGraph

getLayout

hasLayout

  • hasLayout(cell: null | Cell): boolean
  • Returns true if the given cell has a layout. This implementation invokes with {@link Event#LAYOUT_CELLS} as the eventName. Override this if creating layouts in is expensive and return true if will return a layout for the given cell for {@link Event#BEGIN_UPDATE} or {@link Event#END_UPDATE}.

    Parameters

    Returns boolean

isBubbling

  • isBubbling(): boolean
  • Returns true if a layout should bubble, that is, if the parent layout should be executed whenever a cell layout (layout of the children of a cell) has been executed. This implementation returns bubbling.

    Returns boolean

isEnabled

  • isEnabled(): boolean

isEventsEnabled

  • isEventsEnabled(): boolean

layoutCells

  • layoutCells(cells: CellArray, bubble?: boolean): void

removeListener

  • removeListener(funct: Function): void

setBubbling

  • setBubbling(value: boolean): void

setEnabled

  • setEnabled(enabled: boolean): void
  • Enables or disables event handling. This implementation updates enabled.

    Parameters

    • enabled: boolean

      Boolean that specifies the new enabled state.

    Returns void

setEventSource

  • setEventSource(value: null | EventTarget): void

setEventsEnabled

  • setEventsEnabled(value: boolean): void

setGraph

  • setGraph(graph: null | Graph): void

Generated using TypeDoc