GeezerVison is showing maxgraph.github.io — CellPath | @maxgraph/core
Implements a mechanism for temporary cell Ids.
CellPath
Constructors
Properties
StaticPATH_SEPARATOR
PATH_SEPARATOR: string = '.'
Defines the separator between the path components. Default is ".".
Methods
Staticcompare
-
compare(p1: string[], p2: string[]): number
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.
Parameters
- p1: string[]
- p2: string[]
Returns number
Staticcreate
-
create(cell: Cell): string
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
- cell: Cell
Cell whose path should be returned.
Returns string
StaticgetParentPath
-
getParentPath(path: string): string | null
Returns the path for the parent of the cell represented by the given
path. Returns null if the given path has no parent.
Parameters
- path: string
Path whose parent path should be returned.
Returns string | null
Staticresolve
-
Returns the cell for the specified cell path using the given root as the
root of the path.
Parameters
- root: Cell
Root cell of the path to be resolved.
- path: string
String that defines the path.
On This Page
Constructors
Properties
Methods