mxCellPath

Implements a mechanism for temporary cell Ids.

Summary
mxCellPathImplements a mechanism for temporary cell Ids.
Variables
PATH_SEPARATORDefines the separator between the path components.
Functions
createCreates the cell path for the given cell.
getParentPathReturns the path for the parent of the cell represented by the given path.
resolveReturns the cell for the specified cell path using the given root as the root of the path.
compareCompares the given cell paths and returns -1 if p1 is smaller, 0 if p1 is equal and 1 if p1 is greater than p2.

Variables

PATH_SEPARATOR

PATH_SEPARATOR: '.'

Defines the separator between the path components.  Default is “.”.

Functions

create

create: function(cell)

Creates the cell path for the given cell.  The cell path is a concatenation of the indices of all ancestors on the (finite) path to the root, eg.  “0.0.0.1”.

Parameters

cellCell whose path should be returned.

getParentPath

getParentPath: function(path)

Returns the path for the parent of the cell represented by the given path.  Returns null if the given path has no parent.

Parameters

pathPath whose parent path should be returned.

resolve

resolve: function(root,
path)

Returns the cell for the specified cell path using the given root as the root of the path.

Parameters

rootRoot cell of the path to be resolved.
pathString that defines the path.

compare

compare: function(p1,
p2)

Compares the given cell paths and returns -1 if p1 is smaller, 0 if p1 is equal and 1 if p1 is greater than p2.

PATH_SEPARATOR: '.'
Defines the separator between the path components.
create: function(cell)
Creates the cell path for the given cell.
getParentPath: function(path)
Returns the path for the parent of the cell represented by the given path.
resolve: function(root,
path)
Returns the cell for the specified cell path using the given root as the root of the path.
compare: function(p1,
p2)
Compares the given cell paths and returns -1 if p1 is smaller, 0 if p1 is equal and 1 if p1 is greater than p2.
Close