Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph.
For custom attributes we recommend using an XML node as the value of a cell. The following code can be used to create a cell with an XML node as the value:
Optional object that represents the cell value.
Optional
Optional formatted string that defines the style.
Holds the child cells.
Specifies whether the cell is collapsed. Default is false.
Specifies whether the cell is connectable. Default is true.
Specifies whether the cell is an edge. Default is false.
Holds the edges.
Holds the
Holds the Id. Default is null.
List of members that should not be cloned inside
Reference to the parent cell.
Reference to the source terminal.
Holds the style as a string of the form [(stylename|key=value);]. Default is null.
Reference to the target terminal.
Holds the user object. Default is null.
Specifies whether the cell is a vertex. Default is false.
Specifies whether the cell is visible. Default is true.
Returns a clone of the cell. Uses
Returns a clone of the cell's user object.
Returns the specified attribute from the user object if it is an XML node.
Parameters:
Returns the child at the specified index.
Parameters:
Returns the number of child cells.
Returns the edge at the specified index in
Parameters:
Returns the number of edges in the edge array.
Returns the index of the specified edge in
Parameters:
Returns the
Returns the Id of the cell as a string.
Returns the index of the specified child in the child array.
Parameters:
Returns the cell's parent.
Returns a string that describes the
Cells are the elements of the graph model. They represent the state of the groups, vertices and edges in a graph.
Custom attributes
For custom attributes we recommend using an XML node as the value of a cell. The following code can be used to create a cell with an XML node as the value:
For the label to work, mxGraph.convertValueToString and mxGraph.cellLabelChanged should be overridden as follows: