Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new mxCellMarker(graph: mxGraph, validColor: string, invalidColor: string, hotspot: number): mxCellMarker

Properties

currentColor

currentColor: string

Variable: currentColor

Holds the current marker color.

enabled

enabled: boolean

Variable: enabled

Specifies if the marker is enabled. 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.

graph

graph: mxGraph

Variable: graph

Reference to the enclosing .

hotspot

hotspot: number

Variable: hotspot

Specifies the portion of the width and height that should trigger a highlight. The area around the center of the cell to be marked is used as the hotspot. Possible values are between 0 and 1. Default is mxConstants.DEFAULT_HOTSPOT.

hotspotEnabled

hotspotEnabled: boolean

Variable: hotspotEnabled

Specifies if the hotspot is enabled. Default is false.

invalidColor

invalidColor: string

Variable: invalidColor

Holds the invalid marker color.

markedState

markedState: mxCellState

Variable: markedState

Holds the marked .

validColor

validColor: string

Variable: validColor

Holds the valid marker color.

validState

validState: mxCellState

Variable: validState

Holds the marked if it is valid.

Methods

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

destroy

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

getCell

getEventSource

  • getEventSource(): any

getHotspot

  • getHotspot(): number

getMarkedState

getMarkerColor

  • getMarkerColor(evt: Event, state: mxCellState, isValid: boolean): string
  • Function: getMarkerColor

    Returns the valid- or invalidColor depending on the value of isValid. The given is ignored by this implementation.

    Parameters

    Returns string

getState

getStateToMark

getValidState

hasValidState

  • hasValidState(): boolean

intersects

  • Function: intersects

    Returns true if the given coordinate pair intersects the given state. This returns true if the is 0 or the coordinates are inside the hotspot for the given cell state.

    Parameters

    Returns boolean

isEnabled

  • isEnabled(): boolean
  • Function: isEnabled

    Returns true if events are handled. This implementation returns .

    Returns boolean

isEventsEnabled

  • isEventsEnabled(): boolean

isHotspotEnabled

  • isHotspotEnabled(): boolean

isValidState

  • Function: isValidState

    Returns true if the given is a valid state. If this returns true, then the state is stored in . The return value of this method is used as the argument for .

    Parameters

    Returns boolean

mark

  • mark(): void

markCell

  • markCell(cell: mxCell, color: string): void
  • Function: markCell

    Marks the given cell using the given color, or if no color is specified.

    Parameters

    Returns void

process

  • Function: process

    Processes the given event and cell and marks the state returned by with the color returned by . If the markerColor is not null, then the state is stored in . If returns true, then the state is stored in regardless of the marker color. The state is returned regardless of the marker color and valid state.

    Parameters

    Returns mxCellState

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

reset

  • reset(): void

setCurrentState

setEnabled

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

    Enables or disables event handling. This implementation updates .

    Parameters:

    enabled - Boolean that specifies the new enabled state.

    Parameters

    • enabled: boolean

    Returns void

setEventSource

  • setEventSource(value: any): void

setEventsEnabled

  • setEventsEnabled(value: boolean): void

setHotspot

  • setHotspot(hotspot: number): void

setHotspotEnabled

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

    Specifies whether the hotspot should be used in .

    Parameters

    • enabled: boolean

    Returns void

unmark

  • unmark(): void

Generated using TypeDoc