mxCellHighlight

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

var highlight = new mxCellHighlight(graph, '#ff0000', 2);
highlight.highlight(graph.view.getState(cell)));
Summary
mxCellHighlightA helper class to highlight cells.
Functions
mxCellHighlightConstructs a cell highlight.
Variables
keepOnTopSpecifies if the highlights should appear on top of everything else in the overlay pane.
graphReference to the enclosing mxGraph.
stateReference to the mxCellState.
spacingSpecifies the spacing between the highlight for vertices and the vertex.
resetHandlerHolds the handler that automatically invokes reset if the highlight should be hidden.
Functions
setHighlightColorSets the color of the rectangle used to highlight drop targets.
drawHighlightCreates and returns the highlight shape for the given state.
createShapeCreates and returns the highlight shape for the given state.
hideResets the state of the cell marker.
markMarks the <markedState> and fires a mark event.
destroyDestroys the handler and all its resources and DOM nodes.

Functions

mxCellHighlight

function mxCellHighlight(graph,
highlightColor,
strokeWidth)

Constructs a cell highlight.

Variables

keepOnTop

mxCellHighlight.prototype.keepOnTop

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

graph

mxCellHighlight.prototype.graph

Reference to the enclosing mxGraph.

state

mxCellHighlight.prototype.state

Reference to the mxCellState.

spacing

mxCellHighlight.prototype.spacing

Specifies the spacing between the highlight for vertices and the vertex.  Default is 2.

resetHandler

mxCellHighlight.prototype.resetHandler

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

Functions

setHighlightColor

mxCellHighlight.prototype.setHighlightColor = function(color)

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

Parameters

colorString that represents the new highlight color.

drawHighlight

mxCellHighlight.prototype.drawHighlight = function(state)

Creates and returns the highlight shape for the given state.

createShape

mxCellHighlight.prototype.createShape = function(state)

Creates and returns the highlight shape for the given state.

hide

mxCellHighlight.prototype.hide = function()

Resets the state of the cell marker.

mark

Marks the <markedState> and fires a mark event.

destroy

mxCellHighlight.prototype.destroy = function()

Destroys the handler and all its resources and DOM nodes.

function mxCellHighlight(graph,
highlightColor,
strokeWidth)
Constructs a cell highlight.
mxCellHighlight.prototype.keepOnTop
Specifies if the highlights should appear on top of everything else in the overlay pane.
mxCellHighlight.prototype.graph
Reference to the enclosing mxGraph.
Extends mxEventSource to implement a graph component for the browser.
mxCellHighlight.prototype.state
Reference to the mxCellState.
Represents the current state of a cell in a given mxGraphView.
mxCellHighlight.prototype.spacing
Specifies the spacing between the highlight for vertices and the vertex.
mxCellHighlight.prototype.resetHandler
Holds the handler that automatically invokes reset if the highlight should be hidden.
mxCellHighlight.prototype.setHighlightColor = function(color)
Sets the color of the rectangle used to highlight drop targets.
mxCellHighlight.prototype.drawHighlight = function(state)
Creates and returns the highlight shape for the given state.
mxCellHighlight.prototype.createShape = function(state)
Creates and returns the highlight shape for the given state.
mxCellHighlight.prototype.hide = function()
Resets the state of the cell marker.
Marks the markedState and fires a mark event.
mxCellHighlight.prototype.destroy = function()
Destroys the handler and all its resources and DOM nodes.
Close