A port style decorator that uses a node style instance to render the port.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.NodeStylePortStyleAdapter
See Also
Constructors
Creates a port style that uses the provided node style to render the port.
Remarks
Parameters
A map of options to pass to the method.
- nodeStyle - INodeStyle
- The style to use for rendering the port.
- renderSize - Size
The size of the port's visualization. This option sets the renderSize property on the created object.
- offset - Point
An offset for the port visualization. This option sets the offset property on the created object.
Properties
Gets the INodeStyle that is used for rendering the port.
Gets or sets an offset for the port visualization.
Remarks
This will cause the visualization to be shifted by the given amount. This can be used to have a port visualization that is not centered on the port's location, e.g. to get a port visualization that extends outside of the node, while the port lies on the node outline.
The default value is (0,0).
See Also
Gets the renderer implementation that can be queried for implementations that provide details about the visual appearance and visual behavior for a given port and this style instance.
Remarks
const creator = style.renderer.getVisualCreator(port, style)
const visual = creator.createVisual(context)
Implements
Gets or sets the size of the port's visualization.
Remarks
Unlike nodes, ports have no intrinsic size, so a suitable size for the visualization has to be given here.
The default value is (5,5).
See Also
Methods
Create a clone of this object.