The interface used to model edges in an IGraph implementation.
Remarks
IGraph
, edges support the lookup method inherited from the IModelItem interface that can be used to query additional aspects of each instance.Examples
Related Reading in the Developer's Guide
The graph model with all relevant types and their relationships is presented in detail in the section The Graph Model.
Using the look-up mechanism is explained in the section Service Locator Pattern: Lookup.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.IEdge
See Also
Properties
Gets a collection of bends that describe the geometry of this edge.
Remarks
This gives access to a read-only live view of the bends, i.e. the collection can change over time, as well as the bends contained in it. If a snapshot of the current state is needed, one needs to copy the collection.
To modify the bend collection for instances of the default implementation that were created via the factory methods on IGraph, use addBend and remove.
Examples
See Also
Determines whether an edge is a self-loop, that is, it starts and ends at the same port owner.
See Also
Gets a collection of labels that are owned by this instance.
Remarks
This gives access to a read-only live view of the labels, i.e. the collection can change over time, as well as the labels contained in it. If a snapshot of the current state is needed, one needs to copy the collection and its contents.
To modify the label collection for instances of the default implementations that were created via the factory methods on IGraph, use addLabel and remove.
Examples
See Also
Defined in
Gets a collection of ports that are owned by this instance.
Remarks
This gives access to a read-only live view of the ports, i.e. the collection can change over time, as well as the ports contained in it. If a snapshot of the current state is needed, one needs to copy the collection.
To modify the port collection for instances of the default implementations that were created via the factory methods on IGraph, use addPort and remove.
Examples
See Also
Defined in
Gets the source node for the given edge or null
.
Gets the source port instance this edge is connected to.
Remarks
Although the notion of source and target port is used for directed edges, it is still up to the client to decide whether the edge should be treated as such.
To change the ports for instances of the default implementation that were created via the factory methods on IGraph, use setEdgePorts
Examples
See Also
Gets the style that is responsible for the visual representation of this edge in a CanvasComponent.
Remarks
Note that the style instance associated with an edge instance may be shared between multiple edge instances and that the modification of this style will result in a change of the appearance of all edges that are associated with the same style instance.
To change the style for instances of the default implementation that were created via the factory methods on IGraph, use setStyle
Examples
See Also
Gets or sets the tag associated with this instance.
Remarks
Examples
See Also
Implements
Gets the target node for the given edge or null
.
Gets the target port instance this edge is connected to.
Remarks
Although the notion of source and target port is used for directed edges, it is still up to the client to decide whether the edge should be treated as such.
To change the ports for instances of the default implementation that were created via the factory methods on IGraph, use setEdgePorts
Examples
See Also
Methods
Returns an instance that implements the given type or null
.
Remarks
null
implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
$class
property on JavaScript classes inheriting from yFiles classes is only valid once an instance of this subclass was created. Call fixType, first or instantiate the class at least once.Implements
Gets the opposite port owner of an IEdge.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The owner of the port that the IEdge is connected to.
Returns
- ↪IPortOwner
- The owner of the opposite port.
Throws
- Exception({ name: 'ArgumentError' })
- If
owner
is neither the source or target of the edge.
See Also
Static Methods
Gets a snapshot of the points describing the path of an edge.
Remarks
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge whose path points are returned.
Returns
- ↪IListEnumerable<IPoint>
- A list of points which describe the current path of the given
edge
.