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.
getStrokeWidthReturns the stroke width.
repaintUpdates the highlight after a change of the model or view.
hideResets the state of the cell marker.
markMarks the <markedState> and fires a mark event.
isHighlightAtReturns true if this highlight is at the given position.
destroyDestroys the handler and all its resources and DOM nodes.

Functions

mxCellHighlight

function mxCellHighlight(graph,
highlightColor,
strokeWidth,
dashed)

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()

Creates and returns the highlight shape for the given state.

createShape

mxCellHighlight.prototype.createShape = function()

Creates and returns the highlight shape for the given state.

getStrokeWidth

mxCellHighlight.prototype.getStrokeWidth = function(state)

Returns the stroke width.

repaint

mxCellHighlight.prototype.repaint = function()

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

hide

mxCellHighlight.prototype.hide = function()

Resets the state of the cell marker.

mark

Marks the <markedState> and fires a mark event.

isHighlightAt

mxCellHighlight.prototype.isHighlightAt = function(x,
y)

Returns true if this highlight is at the given position.

destroy

mxCellHighlight.prototype.destroy = function()

Destroys the handler and all its resources and DOM nodes.

function mxCellHighlight(graph,
highlightColor,
strokeWidth,
dashed)
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()
Creates and returns the highlight shape for the given state.
mxCellHighlight.prototype.createShape = function()
Creates and returns the highlight shape for the given state.
mxCellHighlight.prototype.getStrokeWidth = function(state)
Returns the stroke width.
mxCellHighlight.prototype.repaint = function()
Updates the highlight after a change of the model or view.
mxCellHighlight.prototype.hide = function()
Resets the state of the cell marker.
Marks the markedState and fires a mark event.
mxCellHighlight.prototype.isHighlightAt = function(x,
y)
Returns true if this highlight is at the given position.
mxCellHighlight.prototype.destroy = function()
Destroys the handler and all its resources and DOM nodes.
Close