Class: VisualEdge

VisualEdge

A VisualEdge is a visualization of an edge between ModelNodes; it describes how the edge is to be drawn. Note that actual drawing logic is not part of this class

Constructor

new VisualEdge(sourceVisualNode, targetVisualNode)

Constructs a VisualEdge. The resulting VisualEdge will represent the visualization of the edge between the two VisualNodes given as arguments
Parameters:
Name Type Description
sourceVisualNode VisualNode One of the Nodes that is connected by this edge. sourceVisualNode.getNode() must either be the parent or the prev node of targetVisualNode.getNode()
targetVisualNode VisualNode One of the Nodes that is connected by this edge. targetVisualNode.getNode() must either be the child or the next node of sourceVisualNode.getNode()
Source:

Methods

getColor() → {String}

Gets the color of the VisualEdge
Source:
Returns:
The color.
Type
String

getDashLength() → {Number}

Gets the dash length of the VisualEdge. A dash length of zero indicates that this VisualEdge is not dashed
Source:
Returns:
The dash length. Always non-negative
Type
Number

getOpacity() → {Number}

Gets the opacity of the VisualEdge
Source:
Returns:
The opacity. Will be between 0 and 1 inclusive
Type
Number

getSourceVisualNode() → {VisualNode}

Gets the source VisualNode. The source VisualNode is the VisualNode connected by this VisualEdge such that getSourceVisualNode().getNode() is either the parent or the prev node of getTargetVisualNode().getNode()
Source:
Returns:
The source VisualNode
Type
VisualNode

getTargetVisualNode() → {VisualNode}

Gets the target VisualNode. The target VisualNode is the VisualNode connected by this VisualEdge such that getTargetVisualNode().getNode() is either the child or the next node the getSourceVisualNode().getNode()
Source:
Returns:
The target VisualNode
Type
VisualNode

getWidth() → {Number}

Gets the line width of this VisualEdge.
Source:
Returns:
The line width
Type
Number

setColor() → {String}

Sets the color of the VisualEdge
Source:
Returns:
The color. The color must be a string that parses to a valid SVG color as defined in http://www.w3.org/TR/SVG/types.html#WSP
Type
String

setDashLength(newDashLength)

Sets the dash length of the VisualEdge. A dash length of zero indicates that this VisualEdge is not dashed
Parameters:
Name Type Description
newDashLength Number The new dash length. Must be non-negative
Source:

setOpacity(newOpacity)

Sets the opacity of the VisualEdge
Parameters:
Name Type Description
newOpacity Number The new opacity. Must be between 0 and 1 inclusive
Source:

setWidth(newWidth)

Sets the line width of this VisualEdge.
Parameters:
Name Type Description
newWidth Number The new line width
Source: