Specifies if string values in cell styles should be evaluated using eval. This will only be used if the string values can't be mapped to objects using StyleRegistry. Default is false. NOTE: Enabling this switch carries a possible security risk.
Specifies if a gesture should be captured when it goes outside of the graph container. Default is true.
Cell that acts as the root of the displayed cell hierarchy.
Specifies the resource key for the status message after a long operation. If the resource for this key does not exist then the value is used as the status message. Default is 'done'.
Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.
Specifies if events can be fired. Default is true.
Optional source for events. Default is null.
Reference to the enclosing graph.
During validation, this contains the last edge HTML DOM node that was processed.
During validation, this contains the last edge's DOM node that was processed.
During validation, this contains the last HTML DOM node that was processed.
During validation, this contains the last DOM node that was processed.
Specifies if shapes should be created, updated and destroyed using the methods of cellRenderer in graph. Default is true.
Specifies if the style should be updated in each validation step. If this is false then the style is only updated if the state is created or if the style of the cell was changed. Default is false.
Specifies the resource key for the status message while the document is being updated. If the resource for this key does not exist then the value is used as the status message. Default is 'updatingDocument'.
Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.
The parameters of the listener are the sender and an EventObject.
Creates and returns the shape used as the background page.
mxRectangle that represents the bounds of the shape.
Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation (see Utils#bind).
Example:
fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN))
EventObject that represents the event.
Optional sender to be passed to the listener. Default value is
the return value of
Returns the mxCellStates for the given array of Cell. The array contains all states that are not null, that is, the returned array may have less elements than the given array. If no argument is given, then this returns states.
Returns the edge style function to be used to render the given edge state.
Returns the fixed source or target terminal point for the given edge.
Boolean that specifies if the terminal is the source.
ConnectionConstraint that specifies the connection.
Returns graphBounds.
Returns the perimeter bounds for the given terminal, edge pair as an Rectangle.
If you have a model where each terminal has a relative child that should act as the graphical endpoint for a connection from/to the terminal, then this method can be replaced as follows:
CellState that represents the terminal.
Number that adds a border between the shape and the perimeter.
var oldGetPerimeterBounds = getPerimeterBounds;
getPerimeterBounds(terminal, edge, isSource)
{
var model = this.graph.getDataModel();
var childCount = model.getChildCount(terminal.cell);
if (childCount > 0)
{
var child = model.getChildAt(terminal.cell, 0);
var geo = model.getGeometry(child);
if (geo != null &&
geo.relative)
{
var state = this.getState(child);
if (state != null)
{
terminal = state;
}
}
}
return oldGetPerimeterBounds.apply(this, arguments);
};
Returns the perimeter function for the given state.
Returns an Point that defines the location of the intersection point between the perimeter and the line between the center of the shape and the given point.
CellState for the source or target terminal.
Point that lies outside the given terminal.
Boolean that specifies if the orthogonal projection onto the perimeter should be returned. If this is false then the intersection of the perimeter and the line between the next and the center point is returned.
Optional border between the perimeter and the shape.
Gets the relative point that describes the given, absolute label position for the given edge state.
Specifies the x-coordinate of the absolute label location.
Specifies the y-coordinate of the absolute label location.
Returns the x-coordinate of the center point for automatic routing.
Returns the y-coordinate of the center point for automatic routing.
Returns the scale.
Returns states.
Returns the nearest ancestor terminal that is visible. The edge appears to be connected to this terminal on the display. The result of this method is cached in CellState.getVisibleTerminalState.
mxCell whose visible terminal should be returned.
Boolean that specifies if the source or target terminal should be returned.
Updates the bounds and redraws the background image.
Example:
If the background image should not be scaled, this can be replaced with the following.
mxImageShape that represents the background image.
mxImage that specifies the image and its dimensions.
Clears the view if currentRoot is not null and revalidates.
Sets the scale and translation and fires a scale and translate event before calling revalidate followed by graph.sizeDidChange.
Decimal value that specifies the new scale (1 is 100%).
X-coordinate of the translation.
Y-coordinate of the translation.
Sets graphBounds.
Sets the scale and fires a scale event before calling revalidate followed by Graph.sizeDidChange.
Decimal value that specifies the new scale (1 is 100%).
Sets states.
Sets the translation and fires a translate event before calling revalidate followed by Graph.sizeDidChange. The translation is the negative of the origin.
X-coordinate of the translation.
Y-coordinate of the translation.
Updates the bounds of the given cell state to reflect the bounds of the stencil if it has a fixed aspect and returns the previous bounds as an Rectangle if the bounds have been modified or null otherwise.
Updates the given CellState.
Updates the given state using the bounding box of t he absolute points. Also updates CellState.terminalDistance, CellState.length and CellState.segments.
Updates CellState.absoluteOffset for the given state. The absolute offset is normally used for the position of the edge label. Is is calculated from the geometry as an absolute offset from the center between the two endpoints if the geometry is absolute, or as the relative distance between the center along the line and the absolute orthogonal distance if the geometry is relative.
Sets the fixed source or target terminal point on the given edge.
Boolean that specifies if the terminal is the source.
ConnectionConstraint that specifies the connection.
Updates the absolute points in the given state using the specified array of Point as the relative points.
Calls validateCell and validateCellState and updates the graphBounds using getBoundingBox. Finally the background is validated using validateBackground.
Optional Cell to be used as the root of the validation. Default is currentRoot or the root of the model.
Calls validateBackgroundImage and validateBackgroundPage.
Recursively creates the cell state for the given cell if visible is true and the given cell is visible. If the cell is not visible but the state exists then it is removed using removeState.
GraphView