GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • @maxgraph/core

This view

  • Original page
  • New address

GeezerVison is showing maxgraph.github.io — CellHighlight | @maxgraph/core

  • CellHighlight

Class CellHighlight

A helper class to highlight cells. Here is an example for a given cell.

const highlight = new CellHighlight(graph, '#ff0000', 2);
highlight.highlight(graph.view.getState(cell));
  • Defined in view/cell/CellHighlight.ts:40
Index

Constructors

constructor

Properties

dashed graph highlightColor keepOnTop opacity repaintHandler resetHandler shape spacing state strokeWidth

Methods

createShape destroy drawHighlight getStrokeWidth hide highlight isHighlightAt repaint setHighlightColor

Constructors

constructor

  • new CellHighlight(
        graph: AbstractGraph,
        highlightColor?: string,
        strokeWidth?: number,
        dashed?: boolean,
    ): CellHighlight

    Parameters

    • graph: AbstractGraph
    • OptionalhighlightColor: string
    • OptionalstrokeWidth: number
    • Optionaldashed: boolean

    Returns CellHighlight

    • Defined in view/cell/CellHighlight.ts:83

Properties

dashed

dashed: boolean = false
  • Defined in view/cell/CellHighlight.ts:46

graph

graph: AbstractGraph

Reference to the enclosing AbstractGraph.

  • Defined in view/cell/CellHighlight.ts:63

highlightColor

highlightColor: string
  • Defined in view/cell/CellHighlight.ts:42

keepOnTop

keepOnTop: boolean = false

Specifies if the highlights should appear on top of everything else in the overlay pane.

Default

false
  • Defined in view/cell/CellHighlight.ts:58

opacity

opacity: number = 100
  • Defined in view/cell/CellHighlight.ts:48

repaintHandler

repaintHandler: Function
  • Defined in view/cell/CellHighlight.ts:50

resetHandler

resetHandler: Function

Holds the handler that automatically invokes reset if the highlight should be hidden.

Default

null
  • Defined in view/cell/CellHighlight.ts:81

shape

shape: Shape | null = null
  • Defined in view/cell/CellHighlight.ts:52

spacing

spacing: number = 2

Specifies the spacing between the highlight for vertices and the vertex.

Default

2
  • Defined in view/cell/CellHighlight.ts:75

state

state: CellState | null = null

Reference to the CellState.

Default

null
  • Defined in view/cell/CellHighlight.ts:69

strokeWidth

strokeWidth: number = 0
  • Defined in view/cell/CellHighlight.ts:44

Methods

createShape

  • createShape(): Shape | null

    Creates and returns the highlight shape for the given state.

    Returns Shape | null

    • Defined in view/cell/CellHighlight.ts:158

destroy

  • destroy(): void

    Destroys the handler and all its resources and DOM nodes.

    Returns void

    • Defined in view/cell/CellHighlight.ts:269

drawHighlight

  • drawHighlight(): void

    Creates and returns the highlight shape for the given state.

    Returns void

    • Defined in view/cell/CellHighlight.ts:142

getStrokeWidth

  • getStrokeWidth(state?: CellState | null): number

    Updates the highlight after a change of the model or view.

    Parameters

    • state: CellState | null = null

    Returns number

    • Defined in view/cell/CellHighlight.ts:187

hide

  • hide(): void

    Resets the state of the cell marker.

    Returns void

    • Defined in view/cell/CellHighlight.ts:226

highlight

  • highlight(state?: CellState | null): void

    Marks the CellState and fires a InternalEvent.MARK event.

    Parameters

    • state: CellState | null = null

    Returns void

    • Defined in view/cell/CellHighlight.ts:233

isHighlightAt

  • isHighlightAt(x: number, y: number): boolean

    Returns true if this highlight is at the given position.

    Parameters

    • x: number
    • y: number

    Returns boolean

    • Defined in view/cell/CellHighlight.ts:250

repaint

  • repaint(): void

    Updates the highlight after a change of the model or view.

    Returns void

    • Defined in view/cell/CellHighlight.ts:194

setHighlightColor

  • setHighlightColor(color: string): void

    Sets the color of the rectangle used to highlight drop targets.

    Parameters

    • color: string

      String that represents the new highlight color.

    Returns void

    • Defined in view/cell/CellHighlight.ts:131

Settings

Member Visibility
  • Protected
  • Inherited
Theme

On This Page

Constructors
constructor
Properties
dashedgraphhighlightColorkeepOnTopopacityrepaintHandlerresetHandlershapespacingstatestrokeWidth
Methods
createShapedestroydrawHighlightgetStrokeWidthhidehighlightisHighlightAtrepaintsetHighlightColor
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.