Edge
Edge is derived class of GraphElem and represents an edge in the graph.
Fields
| Field | Type | Description |
|---|---|---|
isEdge | boolean | Read only. Returns True. |
weight | number | The edge weight, a float value normally between -1.0 and 1.0. |
weightVisible | boolean | True if the edge weight is visible independently of the document’s edgeWeightsVisible setting. |
annotationVisible | boolean | True if the edge annotation is visible independently of the document’s edgeAnnotationsVisible setting. |
source | GraphElem | Read only. The source element of the edge; i.e., the element at the tail-end of the edge. |
target | GraphElem | Read only. The target element of the edge; i.e., the element at the head-end of the edge. |
isBackEdge | boolean | Read only. True if the edge is a back edge. |
splinesDictionary | dictionary or None | Read only. The edge’s splines as a dictionary or None if the edge is hidden in a collapsed group. The keys are the The dictionary values are tuples of tuples of the spline control points. |
arrowheadVertices | tuple or None | Read only. The edge’s arrowhead as a tuple of three tuples (x, y) or None if the edge is hidden in a collapsed group. |
color | Color | The edge’s color in the canvas. |
noteLines | list of LayoutLine | Read only. A list of LayoutLines providing position information for the annotation. |
Methods
isWeightVisible()
Trueif the edge weight is visible either becauseweightVisibleisTrueor the document’sedgeWeightsVisiblesetting isTrue, otherwiseFalse.
isAnnotationVisible()
Trueif the edge annotation is visible either becauseannotationVisibleisTrueor the document’sedgeAnnotationsVisiblesetting isTrue, otherwiseFalse.
insertJunctor( )
Inserts a new junctor on this edge, splitting it into two edges joined by the junctor. The new junctor's operator is set to the document'sdefaultJunctorOperator. After insertion the original edge is replaced and the new elements are left selected. Returns a list of new elements,Junctorinstance first, followed by any new edges. RaisesScriptingExceptionif the insertion fails.
insertJunctor( operator )
Inserts a new junctor on this edge as above, but uses the givenVertexOperatorinstead of the default. Obtain an operator viaApplication.vertexOperatorByName("Fuzzy And")or from theApplication.vertexOperatorslist. RaisesScriptingExceptionif the insertion fails oroperatorisNone.
equals( object )
Returns
Trueif object represents the same edge asself.