A mutable implementation of the IEdge interface that can be used without an IGraph.
Remarks
Type Details
- yFiles module
- view
Constructors
Creates an edge with a default lookup, and, optionally, the given source and target ports.
Remarks
null
here, this will cause all kinds of issues, e.g. with styles or label models that require the ports to be non-null
to work properly.Parameters
A map of options to pass to the method.
- sourcePort - IPort
- The source port for the edge.
- targetPort - IPort
- The target port for the edge.
- style - IEdgeStyle
- The style that is responsible for the visual representation of this edge in a CanvasComponent. This option sets the style property on the created object.
- bends - IListEnumerable<IBend>
- ports - IListEnumerable<IPort>
- labels - IListEnumerable<ILabel>
- tag - IEdge['tag']
Properties
Gets or sets the collection of bends that describe the geometry of this edge.
Determines whether an edge is a self-loop, that is, it starts and ends at the same port owner.
Gets or sets the collection of labels that are owned by this instance.
Gets or sets the collection of ports that are owned by this instance.
Gets or sets the source port instance this edge is connected to.
Remarks
Throws
- Exception({ name: 'InvalidOperationError' })
- if the edge has no source port.
See Also
Implements
Gets or sets the style that is responsible for the visual representation of this edge in a CanvasComponent.
Remarks
See Also
Implements
Gets or sets the tag object associated with this item instance.
Remarks
Implements
Gets or sets the target port instance this edge is connected to.
Remarks
Throws
- Exception({ name: 'InvalidOperationError' })
- if the edge has no target port.
See Also
Implements
Methods
Gets a EdgeDecorator to modify the ports ILookup.
Returns
- ↪EdgeDecorator
- A EdgeDecorator for this instance.
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 re-obtained for further use.Type Parameters
- T
Parameters
A map of options to pass to the method.
- type - Constructor<T>
- the type for which an instance shall be returned
Returns
- ↪T?
- an instance that is assignable to the type or
null
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 nor target of the edge.