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)));
mxCellHighlight | A helper class to highlight cells. |
Functions | |
mxCellHighlight | Constructs a cell highlight. |
Variables | |
keepOnTop | Specifies if the highlights should appear on top of everything else in the overlay pane. |
graph | Reference to the enclosing mxGraph. |
state | Reference to the mxCellState. |
spacing | Specifies the spacing between the highlight for vertices and the vertex. |
resetHandler | Holds the handler that automatically invokes reset if the highlight should be hidden. |
Functions | |
setHighlightColor | Sets the color of the rectangle used to highlight drop targets. |
drawHighlight | Creates and returns the highlight shape for the given state. |
createShape | Creates and returns the highlight shape for the given state. |
getStrokeWidth | Returns the stroke width. |
repaint | Updates the highlight after a change of the model or view. |
hide | Resets the state of the cell marker. |
mark | Marks the <markedState> and fires a mark event. |
isHighlightAt | Returns true if this highlight is at the given position. |
destroy | Destroys the handler and all its resources and DOM nodes. |
mxCellHighlight.prototype.graph
Reference to the enclosing mxGraph.
mxCellHighlight.prototype.state
Reference to the mxCellState.
Marks the <markedState> and fires a mark event.
Constructs a cell highlight.
function mxCellHighlight( graph, highlightColor, strokeWidth, dashed )
Specifies if the highlights should appear on top of everything else in the overlay pane.
mxCellHighlight.prototype.keepOnTop
Reference to the enclosing mxGraph.
mxCellHighlight.prototype.graph
Reference to the mxCellState.
mxCellHighlight.prototype.state
Specifies the spacing between the highlight for vertices and the vertex.
mxCellHighlight.prototype.spacing
Holds the handler that automatically invokes reset if the highlight should be hidden.
mxCellHighlight.prototype.resetHandler
Sets the color of the rectangle used to highlight drop targets.
mxCellHighlight.prototype.setHighlightColor = function( color )
Creates and returns the highlight shape for the given state.
mxCellHighlight.prototype.drawHighlight = function()
Creates and returns the highlight shape for the given state.
mxCellHighlight.prototype.createShape = function()
Returns the stroke width.
mxCellHighlight.prototype.getStrokeWidth = function( state )
Updates the highlight after a change of the model or view.
mxCellHighlight.prototype.repaint = function()
Resets the state of the cell marker.
mxCellHighlight.prototype.hide = function()
Returns true if this highlight is at the given position.
mxCellHighlight.prototype.isHighlightAt = function( x, y )
Destroys the handler and all its resources and DOM nodes.
mxCellHighlight.prototype.destroy = function()