A mutable implementation of the IEdge interface that can be used without an IGraph.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.SimpleEdge
Constructors
Creates an edge with a default lookup, and 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 - Object
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
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 associated with this instance.
Remarks
See Also
Implements
Gets or sets the target port instance this edge is connected to.
Remarks
See Also
Implements
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
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.