Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Edge

Edge is derived class of GraphElem and represents an edge in the graph.

Fields

FieldTypeDescription
isEdgebooleanRead only. Returns True.
weightnumberThe edge weight, a float value normally between -1.0 and 1.0.
weightVisiblebooleanTrue if the edge weight is visible independently of the document’s edgeWeightsVisible setting.
annotationVisiblebooleanTrue if the edge annotation is visible independently of the document’s edgeAnnotationsVisible setting.
sourceGraphElemRead only. The source element of the edge; i.e., the element at the tail-end of the edge.
targetGraphElemRead only. The target element of the edge; i.e., the element at the head-end of the edge.
isBackEdgebooleanRead only. True if the edge is a back edge.
splinesDictionarydictionary or NoneRead 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.
arrowheadVerticestuple or NoneRead only. The edge’s arrowhead as a tuple of three tuples (x, y) or None if the edge is hidden in a collapsed group.
colorColorThe edge’s color in the canvas.
noteLineslist of LayoutLineRead only. A list of LayoutLines providing position information for the annotation.

Methods

isWeightVisible()

True if the edge weight is visible either because weightVisible is True or the document’s edgeWeightsVisible setting is True, otherwise False.

isAnnotationVisible()

True if the edge annotation is visible either because annotationVisible is True or the document’s edgeAnnotationsVisible setting is True, otherwise False.

insertJunctor( )

API 1.18
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's defaultJunctorOperator. After insertion the original edge is replaced and the new elements are left selected. Returns a list of new elements, Junctor instance first, followed by any new edges. Raises ScriptingException if the insertion fails.

insertJunctor( operator )

API 1.18
Inserts a new junctor on this edge as above, but uses the given VertexOperator instead of the default. Obtain an operator via Application.vertexOperatorByName("Fuzzy And") or from the Application.vertexOperators list. Raises ScriptingException if the insertion fails or operator is None.

equals( object )

Returns True if object represents the same edge as self.