Extends mxEventSource to implement a view for a graph. This class is in charge of computing the absolute coordinates for the relative child geometries, the points for perimeters and edge styles and keeping them cached in mxCellStates for faster retrieval. The states are updated whenever the model or the view state (translate, scale) changes. The scale and translate are honoured in the bounds.
mxGraphView | Extends mxEventSource to implement a view for a graph. |
Events | |
mxEvent.UNDO | Fires after the root was changed in setCurrentRoot. |
mxEvent. | Fires after the scale and translate have been changed in scaleAndTranslate. |
mxEvent. | Fires after the scale was changed in setScale. |
mxEvent. | Fires after the translate was changed in setTranslate. |
mxEvent. | Fire if the current root is changed by executing an mxCurrentRootChange. |
Functions | |
mxGraphView | Constructs a new view for the given mxGraph. |
Variables | |
doneResource | Specifies the resource key for the status message after a long operation. |
Functions | |
updatingDocumentResource | Specifies the resource key for the status message while the document is being updated. |
Variables | |
allowEval | Specifies if string values in cell styles should be evaluated using mxUtils.eval. |
captureDocumentGesture | Specifies if a gesture should be captured when it goes outside of the graph container. |
optimizeVmlReflows | Specifies if the <canvas> should be hidden while rendering in IE8 standards mode and quirks mode. |
rendering | Specifies if shapes should be created, updated and destroyed using the methods of mxCellRenderer in graph. |
graph | Reference to the enclosing mxGraph. |
currentRoot | mxCell that acts as the root of the displayed cell hierarchy. |
graphBounds | mxRectangle that caches the scales, translated bounds of the current view. |
scale | Specifies the scale. |
translate | mxPoint that specifies the current translation. |
states | mxDictionary that maps from cell IDs to mxCellStates. |
updateStyle | Specifies if the style should be updated in each validation step. |
lastNode | During validation, this contains the last DOM node that was processed. |
lastHtmlNode | During validation, this contains the last HTML DOM node that was processed. |
lastForegroundNode | During validation, this contains the last edge’s DOM node that was processed. |
lastForegroundHtmlNode | During validation, this contains the last edge HTML DOM node that was processed. |
Functions | |
getGraphBounds | Returns graphBounds. |
setGraphBounds | Sets graphBounds. |
getBounds | Returns the union of all mxCellStates for the given array of mxCells. |
setCurrentRoot | Sets and returns the current root and fires an <undo> event before calling mxGraph.sizeDidChange. |
scaleAndTranslate | Sets the scale and translation and fires a scale and translate event before calling revalidate followed by mxGraph.sizeDidChange. |
getScale | Returns the scale. |
setScale | Sets the scale and fires a scale event before calling revalidate followed by mxGraph.sizeDidChange. |
getTranslate | Returns the translate. |
setTranslate | Sets the translation and fires a translate event before calling revalidate followed by mxGraph.sizeDidChange. |
refresh | Clears the view if currentRoot is not null and revalidates. |
revalidate | Revalidates the complete view with all cell states. |
clear | Removes the state of the given cell and all descendants if the given cell is not the current root. |
invalidate | Invalidates the state of the given cell, all its descendants and connected edges. |
validate | Calls validateCell and validateCellState and updates the graphBounds using getBoundingBox. |
getEmptyBounds | Returns the bounds for an empty graph. |
getBoundingBox | Returns the bounding box of the shape and the label for the given mxCellState and its children if recurse is true. |
createBackgroundPageShape | Creates and returns the shape used as the background page. |
validateBackground | Calls validateBackgroundImage and validateBackgroundPage. |
validateBackgroundImage | Validates the background image. |
validateBackgroundPage | Validates the background page. |
getBackgroundPageBounds | Returns the bounds for the background page. |
redrawBackgroundImage | Updates the bounds and redraws the background image. |
validateCell | Recursively creates the cell state for the given cell if visible is true and the given cell is visible. |
validateCellState | Validates and repaints the mxCellState for the given mxCell. |
updateCellState | Updates the given mxCellState. |
isCellCollapsed | Returns true if the children of the given cell should not be visible in the view. |
updateVertexState | Validates the given cell state. |
updateEdgeState | Validates the given cell state. |
updateVertexLabelOffset | Updates the absoluteOffset of the given vertex cell state. |
resetValidationState | Resets the current validation state. |
stateValidated | Invoked when a state has been processed in <validatePoints>. |
updateFixedTerminalPoints | Sets the initial absolute terminal points in the given state before the edge style is computed. |
updateFixedTerminalPoint | Sets the fixed source or target terminal point on the given edge. |
getFixedTerminalPoint | Returns the fixed source or target terminal point for the given edge. |
updateBoundsFromStencil | 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 mxRectangle if the bounds have been modified or null otherwise. |
updatePoints | Updates the absolute points in the given state using the specified array of mxPoints as the relative points. |
transformControlPoint | Transforms the given control point to an absolute point. |
isLoopStyleEnabled | Returns true if the given edge should be routed with mxGraph.defaultLoopStyle or the mxConstants.STYLE_LOOP defined for the given edge. |
getEdgeStyle | Returns the edge style function to be used to render the given edge state. |
updateFloatingTerminalPoints | Updates the terminal points in the given state after the edge style was computed for the edge. |
updateFloatingTerminalPoint | Updates the absolute terminal point in the given state for the given start and end state, where start is the source if source is true. |
getFloatingTerminalPoint | Returns the floating terminal point for the given edge, start and end state, where start is the source if source is true. |
getTerminalPort | Returns an mxCellState that represents the source or target terminal or port for the given edge. |
getPerimeterPoint | Returns an mxPoint that defines the location of the intersection point between the perimeter and the line between the center of the shape and the given point. |
getRoutingCenterX | Returns the x-coordinate of the center point for automatic routing. |
getRoutingCenterY | Returns the y-coordinate of the center point for automatic routing. |
getPerimeterBounds | Returns the perimeter bounds for the given terminal, edge pair as an mxRectangle. |
getPerimeterFunction | Returns the perimeter function for the given state. |
getNextPoint | Returns the nearest point in the list of absolute points or the center of the opposite terminal. |
getVisibleTerminal | Returns the nearest ancestor terminal that is visible. |
updateEdgeBounds | Updates the given state using the bounding box of t he absolute points. |
getPoint | Returns the absolute point on the edge for the given relative mxGeometry as an mxPoint. |
getRelativePoint | Gets the relative point that describes the given, absolute label position for the given edge state. |
updateEdgeLabelOffset | Updates mxCellState.absoluteOffset for the given state. |
getState | Returns the mxCellState for the given cell. |
isRendering | Returns rendering. |
setRendering | Sets rendering. |
isAllowEval | Returns allowEval. |
setAllowEval | Sets allowEval. |
getStates | Returns states. |
setStates | Sets states. |
getCellStates | Returns the mxCellStates for the given array of mxCells. |
removeState | Removes and returns the mxCellState for the given cell. |
createState | Creates and returns an mxCellState for the given cell and initializes it using <mxCellRenderer.initialize>. |
getCanvas | Returns the DOM node that contains the background-, draw- and overlay- and decoratorpanes. |
getBackgroundPane | Returns the DOM node that represents the background layer. |
getDrawPane | Returns the DOM node that represents the main drawing layer. |
getOverlayPane | Returns the DOM node that represents the layer above the drawing layer. |
getDecoratorPane | Returns the DOM node that represents the topmost drawing layer. |
isContainerEvent | Returns true if the event origin is one of the drawing panes or containers of the view. |
isScrollEvent | Returns true if the event origin is one of the scrollbars of the container in IE. |
init | Initializes the graph event dispatch loop for the specified container and invokes create to create the required DOM nodes for the display. |
installListeners | Installs the required listeners in the container. |
create | Creates the DOM nodes for the HTML display. |
updateHtmlCanvasSize | Updates the size of the HTML canvas. |
createHtmlPane | Creates and returns a drawing pane in HTML (DIV). |
create | Creates the DOM nodes for the VML display. |
createVmlPane | Creates a drawing pane in VML (group). |
create | Creates and returns the DOM nodes for the SVG display. |
updateContainerStyle | Updates the style of the container after installing the SVG DOM elements. |
destroy | Destroys the view and all its resources. |
mxCurrentRootChange | Action to change the current root in a view. |
Functions | |
mxCurrentRootChange | Constructs a change of the current root in the given view. |
execute | Changes the current root of the view. |
Fires after the root was changed in setCurrentRoot. The <code>edit</code> property contains the mxUndoableEdit which contains the mxCurrentRootChange.
Fires after the scale and translate have been changed in scaleAndTranslate. The <code>scale</code>, <code>previousScale</code>, <code>translate</code> and <code>previousTranslate</code> properties contain the new and previous scale and translate, respectively.
Fires after the scale was changed in setScale. The <code>scale</code> and <code>previousScale</code> properties contain the new and previous scale.
Fires after the translate was changed in setTranslate. The <code>translate</code> and <code>previousTranslate</code> properties contain the new and previous value for translate.
Fire if the current root is changed by executing an mxCurrentRootChange. The event name depends on the location of the root in the cell hierarchy with respect to the current root. The <code>root</code> and <code>previous</code> properties contain the new and previous root, respectively.
mxGraphView.prototype.allowEval
Specifies if string values in cell styles should be evaluated using mxUtils.eval. This will only be used if the string values can’t be mapped to objects using mxStyleRegistry. Default is false. NOTE: Enabling this switch carries a possible security risk.
mxGraphView.prototype.rendering
Specifies if shapes should be created, updated and destroyed using the methods of mxCellRenderer in graph. Default is true.
mxGraphView.prototype.graph
Reference to the enclosing mxGraph.
mxGraphView.prototype.currentRoot
mxCell that acts as the root of the displayed cell hierarchy.
mxGraphView.prototype.graphBounds
mxRectangle that caches the scales, translated bounds of the current view.
mxGraphView.prototype.states
mxDictionary that maps from cell IDs to mxCellStates.
mxGraphView.prototype.getGraphBounds = function()
Returns graphBounds.
mxGraphView.prototype.setGraphBounds = function( value )
Sets graphBounds.
mxGraphView.prototype.getBounds = function( cells )
Returns the union of all mxCellStates for the given array of mxCells.
cells | Array of mxCells whose bounds should be returned. |
mxGraphView.prototype.setCurrentRoot = function( root )
Sets and returns the current root and fires an <undo> event before calling mxGraph.sizeDidChange.
root | mxCell that specifies the root of the displayed cell hierarchy. |
mxGraphView.prototype.scaleAndTranslate = function( scale, dx, dy )
Sets the scale and translation and fires a scale and translate event before calling revalidate followed by mxGraph.sizeDidChange.
scale | Decimal value that specifies the new scale (1 is 100%). |
dx | X-coordinate of the translation. |
dy | Y-coordinate of the translation. |
mxGraphView.prototype.getScale = function()
Returns the scale.
mxGraphView.prototype.setScale = function( value )
Sets the scale and fires a scale event before calling revalidate followed by mxGraph.sizeDidChange.
value | Decimal value that specifies the new scale (1 is 100%). |
mxGraphView.prototype.getTranslate = function()
Returns the translate.
mxGraphView.prototype.setTranslate = function( dx, dy )
Sets the translation and fires a translate event before calling revalidate followed by mxGraph.sizeDidChange. The translation is the negative of the origin.
dx | X-coordinate of the translation. |
dy | Y-coordinate of the translation. |
mxGraphView.prototype.refresh = function()
Clears the view if currentRoot is not null and revalidates.
mxGraphView.prototype.clear = function( cell, force, recurse )
Removes the state of the given cell and all descendants if the given cell is not the current root.
cell | Optional mxCell for which the state should be removed. Default is the root of the model. |
force | Boolean indicating if the current root should be ignored for recursion. |
mxGraphView.prototype.invalidate = function( cell, recurse, includeEdges )
Invalidates the state of the given cell, all its descendants and connected edges.
cell | Optional mxCell to be invalidated. Default is the root of the model. |
mxGraphView.prototype.validate = function( cell )
Calls validateCell and validateCellState and updates the graphBounds using getBoundingBox. Finally the background is validated using validateBackground.
cell | Optional mxCell to be used as the root of the validation. Default is currentRoot or the root of the model. |
mxGraphView.prototype.getEmptyBounds = function()
Returns the bounds for an empty graph. This returns a rectangle at translate with the size of 0 x 0.
mxGraphView.prototype.getBoundingBox = function( state, recurse )
Returns the bounding box of the shape and the label for the given mxCellState and its children if recurse is true.
state | mxCellState whose bounding box should be returned. |
recurse | Optional boolean indicating if the children should be included. Default is true. |
mxGraphView.prototype.createBackgroundPageShape = function( bounds )
Creates and returns the shape used as the background page.
bounds | mxRectangle that represents the bounds of the shape. |
mxGraphView.prototype.validateBackground = function()
Calls validateBackgroundImage and validateBackgroundPage.
mxGraphView.prototype.redrawBackgroundImage = function( backgroundImage, bg )
Updates the bounds and redraws the background image.
If the background image should not be scaled, this can be replaced with the following.
mxGraphView.prototype.redrawBackground = function(backgroundImage, bg) { backgroundImage.bounds.x = this.translate.x; backgroundImage.bounds.y = this.translate.y; backgroundImage.bounds.width = bg.width; backgroundImage.bounds.height = bg.height; backgroundImage.redraw(); };
backgroundImage | mxImageShape that represents the background image. |
bg | mxImage that specifies the image and its dimensions. |
mxGraphView.prototype.validateCell = function( cell, visible )
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.
cell | mxCell whose mxCellState should be created. |
visible | Optional boolean indicating if the cell should be visible. Default is true. |
mxGraphView.prototype.validateCellState = function( cell, recurse )
Validates and repaints the mxCellState for the given mxCell.
cell | mxCell whose mxCellState should be validated. |
recurse | Optional boolean indicating if the children of the cell should be validated. Default is true. |
mxGraphView.prototype.updateCellState = function( state )
Updates the given mxCellState.
state | mxCellState to be updated. |
mxGraphView.prototype.isCellCollapsed = function( cell )
Returns true if the children of the given cell should not be visible in the view. This implementation uses mxGraph.isCellVisible but it can be overidden to use a separate condition.
mxGraphView.prototype.updateVertexLabelOffset = function( state )
Updates the absoluteOffset of the given vertex cell state. This takes into account the label position styles.
state | mxCellState whose absolute offset should be updated. |
mxGraphView.prototype.stateValidated = function( state )
Invoked when a state has been processed in <validatePoints>. This is used to update the order of the DOM nodes of the shape.
state | mxCellState that represents the cell state. |
mxGraphView.prototype.updateFixedTerminalPoints = function( edge, source, target )
Sets the initial absolute terminal points in the given state before the edge style is computed.
edge | mxCellState whose initial terminal points should be updated. |
source | mxCellState which represents the source terminal. |
target | mxCellState which represents the target terminal. |
mxGraphView.prototype.updateFixedTerminalPoint = function( edge, terminal, source, constraint )
Sets the fixed source or target terminal point on the given edge.
edge | mxCellState whose terminal point should be updated. |
terminal | mxCellState which represents the actual terminal. |
source | Boolean that specifies if the terminal is the source. |
constraint | mxConnectionConstraint that specifies the connection. |
mxGraphView.prototype.getFixedTerminalPoint = function( edge, terminal, source, constraint )
Returns the fixed source or target terminal point for the given edge.
edge | mxCellState whose terminal point should be returned. |
terminal | mxCellState which represents the actual terminal. |
source | Boolean that specifies if the terminal is the source. |
constraint | mxConnectionConstraint that specifies the connection. |
mxGraphView.prototype.updateBoundsFromStencil = function( state )
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 mxRectangle if the bounds have been modified or null otherwise.
edge | mxCellState whose bounds should be updated. |
mxGraphView.prototype.updatePoints = function( edge, points, source, target )
Updates the absolute points in the given state using the specified array of mxPoints as the relative points.
edge | mxCellState whose absolute points should be updated. |
points | Array of mxPoints that constitute the relative points. |
source | mxCellState that represents the source terminal. |
target | mxCellState that represents the target terminal. |
mxGraphView.prototype.isLoopStyleEnabled = function( edge, points, source, target )
Returns true if the given edge should be routed with mxGraph.defaultLoopStyle or the mxConstants.STYLE_LOOP defined for the given edge. This implementation returns true if the given edge is a loop and does not
mxGraphView.prototype.updateFloatingTerminalPoints = function( state, source, target )
Updates the terminal points in the given state after the edge style was computed for the edge.
state | mxCellState whose terminal points should be updated. |
source | mxCellState that represents the source terminal. |
target | mxCellState that represents the target terminal. |
mxGraphView.prototype.updateFloatingTerminalPoint = function( edge, start, end, source )
Updates the absolute terminal point in the given state for the given start and end state, where start is the source if source is true.
edge | mxCellState whose terminal point should be updated. |
start | mxCellState for the terminal on “this” side of the edge. |
end | mxCellState for the terminal on the other side of the edge. |
source | Boolean indicating if start is the source terminal state. |
mxGraphView.prototype.getFloatingTerminalPoint = function( edge, start, end, source )
Returns the floating terminal point for the given edge, start and end state, where start is the source if source is true.
edge | mxCellState whose terminal point should be returned. |
start | mxCellState for the terminal on “this” side of the edge. |
end | mxCellState for the terminal on the other side of the edge. |
source | Boolean indicating if start is the source terminal state. |
mxGraphView.prototype.getTerminalPort = function( state, terminal, source )
Returns an mxCellState that represents the source or target terminal or port for the given edge.
state | mxCellState that represents the state of the edge. |
terminal | mxCellState that represents the terminal. |
source | Boolean indicating if the given terminal is the source terminal. |
mxGraphView.prototype.getPerimeterPoint = function( terminal, next, orthogonal, border )
Returns an mxPoint that defines the location of the intersection point between the perimeter and the line between the center of the shape and the given point.
terminal | mxCellState for the source or target terminal. |
next | mxPoint that lies outside of the given terminal. |
orthogonal | 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. |
border | Optional border between the perimeter and the shape. |
mxGraphView.prototype.getPerimeterBounds = function( terminal, border )
Returns the perimeter bounds for the given terminal, edge pair as an mxRectangle.
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:
var oldGetPerimeterBounds = mxGraphView.prototype.getPerimeterBounds; mxGraphView.prototype.getPerimeterBounds = function(terminal, edge, isSource) { var model = this.graph.getModel(); 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); };
terminal | mxCellState that represents the terminal. |
border | Number that adds a border between the shape and the perimeter. |
mxGraphView.prototype.getNextPoint = function( edge, opposite, source )
Returns the nearest point in the list of absolute points or the center of the opposite terminal.
edge | mxCellState that represents the edge. |
opposite | mxCellState that represents the opposite terminal. |
source | Boolean indicating if the next point for the source or target should be returned. |
mxGraphView.prototype.getVisibleTerminal = function( edge, source )
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 mxCellState.getVisibleTerminalState.
edge | mxCell whose visible terminal should be returned. |
source | Boolean that specifies if the source or target terminal should be returned. |
mxGraphView.prototype.updateEdgeBounds = function( state )
Updates the given state using the bounding box of t he absolute points. Also updates mxCellState.terminalDistance, mxCellState.length and mxCellState.segments.
state | mxCellState whose bounds should be updated. |
mxGraphView.prototype.getPoint = function( state, geometry )
Returns the absolute point on the edge for the given relative mxGeometry as an mxPoint. The edge is represented by the given mxCellState.
state | mxCellState that represents the state of the parent edge. |
geometry | mxGeometry that represents the relative location. |
mxGraphView.prototype.getRelativePoint = function( edgeState, x, y )
Gets the relative point that describes the given, absolute label position for the given edge state.
state | mxCellState that represents the state of the parent edge. |
x | Specifies the x-coordinate of the absolute label location. |
y | Specifies the y-coordinate of the absolute label location. |
mxGraphView.prototype.updateEdgeLabelOffset = function( state )
Updates mxCellState.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.
state | mxCellState whose absolute offset should be updated. |
mxGraphView.prototype.getState = function( cell, create )
Returns the mxCellState for the given cell. If create is true, then the state is created if it does not yet exist.
cell | mxCell for which the mxCellState should be returned. |
create | Optional boolean indicating if a new state should be created if it does not yet exist. Default is false. |
mxGraphView.prototype.isRendering = function()
Returns rendering.
mxGraphView.prototype.setRendering = function( value )
Sets rendering.
mxGraphView.prototype.isAllowEval = function()
Returns allowEval.
mxGraphView.prototype.setAllowEval = function( value )
Sets allowEval.
mxGraphView.prototype.getStates = function()
Returns states.
mxGraphView.prototype.setStates = function( value )
Sets states.
mxGraphView.prototype.getCellStates = function( cells )
Returns the mxCellStates for the given array of mxCells. 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.
mxGraphView.prototype.removeState = function( cell )
Removes and returns the mxCellState for the given cell.
cell | mxCell for which the mxCellState should be removed. |
mxGraphView.prototype.createState = function( cell )
Creates and returns an mxCellState for the given cell and initializes it using <mxCellRenderer.initialize>.
cell | mxCell for which a new mxCellState should be created. |
mxGraphView.prototype.init = function()
Initializes the graph event dispatch loop for the specified container and invokes create to create the required DOM nodes for the display.
Action to change the current root in a view.
Functions | |
mxCurrentRootChange | Constructs a change of the current root in the given view. |
execute | Changes the current root of the view. |
Sets and returns the current root and fires an undo event before calling mxGraph.sizeDidChange.
mxGraphView.prototype.setCurrentRoot = function( root )
Sets the scale and translation and fires a scale and translate event before calling revalidate followed by mxGraph.sizeDidChange.
mxGraphView.prototype.scaleAndTranslate = function( scale, dx, dy )
Sets the scale and fires a scale event before calling revalidate followed by mxGraph.sizeDidChange.
mxGraphView.prototype.setScale = function( value )
Sets the translation and fires a translate event before calling revalidate followed by mxGraph.sizeDidChange.
mxGraphView.prototype.setTranslate = function( dx, dy )
Constructs a new view for the given mxGraph.
function mxGraphView( graph )
Specifies the resource key for the status message after a long operation.
mxGraphView.prototype.doneResource
Specifies if string values in cell styles should be evaluated using mxUtils.eval.
mxGraphView.prototype.allowEval
Evaluates the given expression using eval and returns the JavaScript object that represents the expression result.
eval: function( expr )
Specifies if a gesture should be captured when it goes outside of the graph container.
mxGraphView.prototype.captureDocumentGesture
Specifies if the canvas should be hidden while rendering in IE8 standards mode and quirks mode.
mxGraphView.prototype.optimizeVmlReflows
Specifies if shapes should be created, updated and destroyed using the methods of mxCellRenderer in graph.
mxGraphView.prototype.rendering
Reference to the enclosing mxGraph.
mxGraphView.prototype.graph
mxCell that acts as the root of the displayed cell hierarchy.
mxGraphView.prototype.currentRoot
mxRectangle that caches the scales, translated bounds of the current view.
mxGraphView.prototype.graphBounds
Specifies the scale.
mxGraphView.prototype.scale
mxPoint that specifies the current translation.
mxGraphView.prototype.translate
mxDictionary that maps from cell IDs to mxCellStates.
mxGraphView.prototype.states
Specifies if the style should be updated in each validation step.
mxGraphView.prototype.updateStyle
During validation, this contains the last DOM node that was processed.
mxGraphView.prototype.lastNode
During validation, this contains the last HTML DOM node that was processed.
mxGraphView.prototype.lastHtmlNode
During validation, this contains the last edge’s DOM node that was processed.
mxGraphView.prototype.lastForegroundNode
During validation, this contains the last edge HTML DOM node that was processed.
mxGraphView.prototype.lastForegroundHtmlNode
Returns graphBounds.
mxGraphView.prototype.getGraphBounds = function()
Sets graphBounds.
mxGraphView.prototype.setGraphBounds = function( value )
Returns the union of all mxCellStates for the given array of mxCells.
mxGraphView.prototype.getBounds = function( cells )
Called when the size of the graph has changed.
mxGraph.prototype.sizeDidChange = function()
Revalidates the complete view with all cell states.
mxGraphView.prototype.revalidate = function()
Returns the scale.
mxGraphView.prototype.getScale = function()
Returns the translate.
mxGraphView.prototype.getTranslate = function()
Clears the view if currentRoot is not null and revalidates.
mxGraphView.prototype.refresh = function()
Removes the state of the given cell and all descendants if the given cell is not the current root.
mxGraphView.prototype.clear = function( cell, force, recurse )
Invalidates the state of the given cell, all its descendants and connected edges.
mxGraphView.prototype.invalidate = function( cell, recurse, includeEdges )
Calls validateCell and validateCellState and updates the graphBounds using getBoundingBox.
mxGraphView.prototype.validate = function( cell )
Recursively creates the cell state for the given cell if visible is true and the given cell is visible.
mxGraphView.prototype.validateCell = function( cell, visible )
Validates and repaints the mxCellState for the given mxCell.
mxGraphView.prototype.validateCellState = function( cell, recurse )
Returns the bounding box of the shape and the label for the given mxCellState and its children if recurse is true.
mxGraphView.prototype.getBoundingBox = function( state, recurse )
Returns the bounds for an empty graph.
mxGraphView.prototype.getEmptyBounds = function()
Creates and returns the shape used as the background page.
mxGraphView.prototype.createBackgroundPageShape = function( bounds )
Calls validateBackgroundImage and validateBackgroundPage.
mxGraphView.prototype.validateBackground = function()
Validates the background image.
mxGraphView.prototype.validateBackgroundImage = function()
Validates the background page.
mxGraphView.prototype.validateBackgroundPage = function()
Returns the bounds for the background page.
mxGraphView.prototype.getBackgroundPageBounds = function()
Updates the bounds and redraws the background image.
mxGraphView.prototype.redrawBackgroundImage = function( backgroundImage, bg )
Updates the given mxCellState.
mxGraphView.prototype.updateCellState = function( state )
Returns true if the children of the given cell should not be visible in the view.
mxGraphView.prototype.isCellCollapsed = function( cell )
Validates the given cell state.
mxGraphView.prototype.updateVertexState = function( state, geo )
Validates the given cell state.
mxGraphView.prototype.updateEdgeState = function( state, geo )
Updates the absoluteOffset of the given vertex cell state.
mxGraphView.prototype.updateVertexLabelOffset = function( state )
Resets the current validation state.
mxGraphView.prototype.resetValidationState = function()
Invoked when a state has been processed in validatePoints.
mxGraphView.prototype.stateValidated = function( state )
Sets the initial absolute terminal points in the given state before the edge style is computed.
mxGraphView.prototype.updateFixedTerminalPoints = function( edge, source, target )
Sets the fixed source or target terminal point on the given edge.
mxGraphView.prototype.updateFixedTerminalPoint = function( edge, terminal, source, constraint )
Returns the fixed source or target terminal point for the given edge.
mxGraphView.prototype.getFixedTerminalPoint = function( edge, terminal, source, constraint )
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 mxRectangle if the bounds have been modified or null otherwise.
mxGraphView.prototype.updateBoundsFromStencil = function( state )
Updates the absolute points in the given state using the specified array of mxPoints as the relative points.
mxGraphView.prototype.updatePoints = function( edge, points, source, target )
Transforms the given control point to an absolute point.
mxGraphView.prototype.transformControlPoint = function( state, pt )
Returns true if the given edge should be routed with mxGraph.defaultLoopStyle or the mxConstants.STYLE_LOOP defined for the given edge.
mxGraphView.prototype.isLoopStyleEnabled = function( edge, points, source, target )
mxEdgeStyle to be used for loops.
mxGraph.prototype.defaultLoopStyle
Returns the edge style function to be used to render the given edge state.
mxGraphView.prototype.getEdgeStyle = function( edge, points, source, target )
Updates the terminal points in the given state after the edge style was computed for the edge.
mxGraphView.prototype.updateFloatingTerminalPoints = function( state, source, target )
Updates the absolute terminal point in the given state for the given start and end state, where start is the source if source is true.
mxGraphView.prototype.updateFloatingTerminalPoint = function( edge, start, end, source )
Returns the floating terminal point for the given edge, start and end state, where start is the source if source is true.
mxGraphView.prototype.getFloatingTerminalPoint = function( edge, start, end, source )
Returns an mxCellState that represents the source or target terminal or port for the given edge.
mxGraphView.prototype.getTerminalPort = function( state, terminal, source )
Returns an mxPoint that defines the location of the intersection point between the perimeter and the line between the center of the shape and the given point.
mxGraphView.prototype.getPerimeterPoint = function( terminal, next, orthogonal, border )
Returns the x-coordinate of the center point for automatic routing.
mxGraphView.prototype.getRoutingCenterX = function ( state )
Returns the y-coordinate of the center point for automatic routing.
mxGraphView.prototype.getRoutingCenterY = function ( state )
Returns the perimeter bounds for the given terminal, edge pair as an mxRectangle.
mxGraphView.prototype.getPerimeterBounds = function( terminal, border )
Returns the perimeter function for the given state.
mxGraphView.prototype.getPerimeterFunction = function( state )
Returns the nearest point in the list of absolute points or the center of the opposite terminal.
mxGraphView.prototype.getNextPoint = function( edge, opposite, source )
Returns the nearest ancestor terminal that is visible.
mxGraphView.prototype.getVisibleTerminal = function( edge, source )
Updates the given state using the bounding box of t he absolute points.
mxGraphView.prototype.updateEdgeBounds = function( state )
Returns the absolute point on the edge for the given relative mxGeometry as an mxPoint.
mxGraphView.prototype.getPoint = function( state, geometry )
Gets the relative point that describes the given, absolute label position for the given edge state.
mxGraphView.prototype.getRelativePoint = function( edgeState, x, y )
Updates mxCellState.absoluteOffset for the given state.
mxGraphView.prototype.updateEdgeLabelOffset = function( state )
mxPoint that holds the absolute offset.
mxCellState.prototype.absoluteOffset
Returns the mxCellState for the given cell.
mxGraphView.prototype.getState = function( cell, create )
Returns rendering.
mxGraphView.prototype.isRendering = function()
Sets rendering.
mxGraphView.prototype.setRendering = function( value )
Returns allowEval.
mxGraphView.prototype.isAllowEval = function()
Sets allowEval.
mxGraphView.prototype.setAllowEval = function( value )
Returns states.
mxGraphView.prototype.getStates = function()
Sets states.
mxGraphView.prototype.setStates = function( value )
Returns the mxCellStates for the given array of mxCells.
mxGraphView.prototype.getCellStates = function( cells )
Removes and returns the mxCellState for the given cell.
mxGraphView.prototype.removeState = function( cell )
Creates and returns an mxCellState for the given cell and initializes it using mxCellRenderer.initialize.
mxGraphView.prototype.createState = function( cell )
Returns the DOM node that contains the background-, draw- and overlay- and decoratorpanes.
mxGraphView.prototype.getCanvas = function()
Returns the DOM node that represents the background layer.
mxGraphView.prototype.getBackgroundPane = function()
Returns the DOM node that represents the main drawing layer.
mxGraphView.prototype.getDrawPane = function()
Returns the DOM node that represents the layer above the drawing layer.
mxGraphView.prototype.getOverlayPane = function()
Returns the DOM node that represents the topmost drawing layer.
mxGraphView.prototype.getDecoratorPane = function()
Returns true if the event origin is one of the drawing panes or containers of the view.
mxGraphView.prototype.isContainerEvent = function( evt )
Returns true if the event origin is one of the scrollbars of the container in IE.
mxGraphView.prototype.isScrollEvent = function( evt )
Initializes the graph event dispatch loop for the specified container and invokes create to create the required DOM nodes for the display.
mxGraphView.prototype.init = function()
Creates the DOM nodes for the HTML display.
mxGraphView.prototype.createHtml = function()
Installs the required listeners in the container.
mxGraphView.prototype.installListeners = function()
Updates the size of the HTML canvas.
mxGraphView.prototype.updateHtmlCanvasSize = function( width, height )
Creates and returns a drawing pane in HTML (DIV).
mxGraphView.prototype.createHtmlPane = function( width, height )
Creates a drawing pane in VML (group).
mxGraphView.prototype.createVmlPane = function( width, height )
Updates the style of the container after installing the SVG DOM elements.
mxGraphView.prototype.updateContainerStyle = function( container )
Destroys the view and all its resources.
mxGraphView.prototype.destroy = function()
Constructs a change of the current root in the given view.
function mxCurrentRootChange( view, root )
Changes the current root of the view.
mxCurrentRootChange.prototype.execute = function()
Returns true if the given cell is visible in this graph.
mxGraph.prototype.isCellVisible = function( cell )
Returns the visible source or target terminal state.
mxCellState.prototype.getVisibleTerminalState = function( source )
Caches the distance between the end points for an edge.
mxCellState.prototype.terminalDistance
Caches the length of an edge.
mxCellState.prototype.length
Array of numbers that represent the cached length of each segment of the edge.
mxCellState.prototype.segments