mxCellState

Represents the current state of a cell in a given mxGraphView.

Summary
mxCellStateRepresents the current state of a cell in a given mxGraphView.
Variables
viewReference to the enclosing mxGraphView.
cellReference to the mxCell that is represented by this state.
styleContains an array of key, value pairs that represent the style of the cell.
invalidSpecifies if the state is invalid.
originmxPoint that holds the origin for all child cells.
absolutePointsHolds an array of mxPoints that represent the absolute points of an edge.
absoluteOffsetmxPoint that holds the absolute offset.
terminalDistanceCaches the distance between the end points for an edge.
lengthCaches the length of an edge.
segmentsArray of numbers that represent the cached length of each segment of the edge.
labelBoundsHolds the rectangle which contains the label.
boundingBoxHolds the largest rectangle which contains all rendering for this cell.
Functions
mxCellStateConstructs a new object that represents the current state of the given cell in the specified view.
getPerimeterBoundsReturns the mxRectangle that should be used as the perimeter of the cell.
copyReturns a copy of this state where all members are deeply cloned except the view and cell references, which are copied with no cloning to the new instance.

Variables

view

var $view

Reference to the enclosing mxGraphView.

cell

var $cell

Reference to the mxCell that is represented by this state.

style

var $style

Contains an array of key, value pairs that represent the style of the cell.

invalid

var $invalid

Specifies if the state is invalid.  Default is true.

origin

var $origin

mxPoint that holds the origin for all child cells.  Default is a new empty mxPoint.

absolutePoints

var $absolutePoints

Holds an array of mxPoints that represent the absolute points of an edge.

absoluteOffset

var $absoluteOffset

mxPoint that holds the absolute offset.  For edges, this is the absolute coordinates of the label position.  For vertices, this is the offset of the label relative to the top, left corner of the vertex.

terminalDistance

var $terminalDistance

Caches the distance between the end points for an edge.

length

var $length

Caches the length of an edge.

segments

var $segments

Array of numbers that represent the cached length of each segment of the edge.

labelBounds

var $labelBounds

Holds the rectangle which contains the label.

boundingBox

var $boundingBox

Holds the largest rectangle which contains all rendering for this cell.

Functions

mxCellState

function mxCellState($view =  null,
$cell =  null,
$style =  null)

Constructs a new object that represents the current state of the given cell in the specified view.

Parameters

viewmxGraphView that contains the state.
cellmxCell that this state represents.
styleArray of key, value pairs that constitute the style.

getPerimeterBounds

function getPerimeterBounds($border =  0)

Returns the mxRectangle that should be used as the perimeter of the cell.

copy

function copy()

Returns a copy of this state where all members are deeply cloned except the view and cell references, which are copied with no cloning to the new instance.

Implements a view for the graph.
var $view
Reference to the enclosing mxGraphView.
var $cell
Reference to the mxCell that is represented by this state.
Cells are the elements of the graph model.
var $style
Contains an array of key, value pairs that represent the style of the cell.
var $invalid
Specifies if the state is invalid.
var $origin
mxPoint that holds the origin for all child cells.
Implements a 2-dimensional point with double precision coordinates.
var $absolutePoints
Holds an array of mxPoints that represent the absolute points of an edge.
var $absoluteOffset
mxPoint that holds the absolute offset.
var $terminalDistance
Caches the distance between the end points for an edge.
var $length
Caches the length of an edge.
var $segments
Array of numbers that represent the cached length of each segment of the edge.
var $labelBounds
Holds the rectangle which contains the label.
var $boundingBox
Holds the largest rectangle which contains all rendering for this cell.
function mxCellState($view =  null,
$cell =  null,
$style =  null)
Constructs a new object that represents the current state of the given cell in the specified view.
function getPerimeterBounds($border =  0)
Returns the mxRectangle that should be used as the perimeter of the cell.
Implements a 2-dimensional rectangle with double precision coordinates.
function copy()
Returns a copy of this state where all members are deeply cloned except the view and cell references, which are copied with no cloning to the new instance.
Close