Port style implementation that can show predefined shapes of type ShapeNodeShape.
Type Details
- yFiles module
- view
See Also
Constructors
Initializes a new instance of this class.
Parameters
A map of options to pass to the method.
- 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.
- stroke - Stroke
- fill - Fill
- shape - ShapeNodeShape
- The shape for this style. This option sets the shape property on the created object.
- keepIntrinsicAspectRatio - boolean
- A value indicating whether to keep the intrinsic aspect ratio of the shape. This option sets the keepIntrinsicAspectRatio property on the created object.
Properties
Gets or sets a value indicating whether to keep the intrinsic aspect ratio of the shape.
Remarks
The intrinsic aspect ratio is determined by the renderer.
The default value is false
. If enabled, the default implementation uses the intrinsic aspect ratio of the given shape.
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).
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).
Gets or sets the shape for this style.
Remarks
Methods
Create a clone of this object.