Constructor
new VisualGraph(graph, layout, hostPermutation)
Parameters:
Name | Type | Description |
---|---|---|
graph |
Graph | The underlying Graph that this VisualGraph is a visualization of |
layout |
Layout | A layout object that is responsible for setting the positions of VisualNodes and Edges |
hostPermutation |
HostPermutation |
- Source:
Methods
getGraph() → {ModelGraph}
- Source:
Returns:
- Type
- ModelGraph
getHeight() → {Number}
- Source:
Returns:
- Type
- Number
getHosts() → {Array.<String>}
- Source:
Returns:
- Type
- Array.<String>
getNonStartVisualNodes() → {Array.<VisualNode>}
Returns non-start VisualNodes in this VisualGraph as an array. Start nodes correspond to dummy head ModelNodes and may be drawn as a header depending on the visualization
There are no guarantees about the ordering of elements in the returned array. Note that a new array is created to prevent access to the underlying one, so this method takes linear time.
- Source:
Returns:
- Type
- Array.<VisualNode>
getStartVisualNodes() → {Array.<VisualNode>}
Returns only start VisualNodes in this VisualGraph as an array. Start nodes correspond to dummy head ModelNodes and may be drawn as a header depending on the visualization
There are no guarantees about the ordering of elements in the returned array. Note that a new array is created to prevent access to the underlying one, so this method takes linear time.
- Source:
Returns:
- Type
- Array.<VisualNode>
getVisualEdgeByNodes(node1, node2) → {VisualEdge}
Parameters:
Name | Type | Description |
---|---|---|
node1 |
ModelNode | One of the end nodes of the edge |
node2 |
ModelNode | One of the end nodes of the edge |
- Source:
Returns:
- Type
- VisualEdge
getVisualEdges() → {Array.<VisualEdge>}
Returns all VisualEdges in this VisualGraph as an array.
There are no guarantees about the ordering of elements in the returned array. Note that a new array is created to prevent access to the underlying one, so this method takes linear time.
- Source:
Returns:
- Type
- Array.<VisualEdge>
getVisualNodeByNode(node) → {VisualNode}
Parameters:
Name | Type | Description |
---|---|---|
node |
ModelNode | The node whose visualization within this graph will be returned |
- Source:
Returns:
- Type
- VisualNode
getVisualNodes() → {Array.<VisualNode>}
Returns all VisualNodes in this VisualGraph as an array.
There are no guarantees about the ordering of elements in the returned array. Note that a new array is created to prevent access to the underlying one, so this method takes linear time.
- Source:
Returns:
- Type
- Array.<VisualNode>
getWidth() → {Number}
- Source:
Returns:
- Type
- Number
update()
- Source: