The interface used in an IGraph implementation for IEdges to connect to.
Remarks
IGraph
, this item supports the lookup method that can be used to query additional aspects of the item.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.IPort
See Also
Properties
Gets a live view of the location of the port in world coordinates.
Remarks
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 snapshot of the current location of the port.
Remarks
See Also
Gets the IPortLocationModelParameter that is used to determine the location of this port.
Remarks
The port location can be calculated using the model's getLocation method or the methods location and dynamicLocation.
To change the port location parameter for instances of the default implementation that were created via the factory methods on IGraph, use setPortLocationParameter
Note that parameters may be shared across port instances.
Examples
See Also
Gets the owner of this port.
Remarks
In traditional IGraph implementations, this will be an INode and can safely be cast to one. In order to get to the IEdges that connect to this instance, use IGraph's edgesAt method.
Note that for instances of the default implementation that were created via the factory methods on IGraph, the owner can't be changed after creation and the port has to be deleted and recreated with a new owner.
Examples
See Also
Gets the style that is responsible for the visual representation of this port in a CanvasComponent.
Remarks
Note that the style instance associated with a port instance may be shared between multiple port instances and that the modification of this style will result in a change of the appearance of all ports 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
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.