Node style implementation that can show predefined shapes of type ShapeNodeShape.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.ShapeNodeStyle
See Also
Constructors
Creates a new instance using the provided renderer.
Parameters
A map of options to pass to the method.
- renderer - ShapeNodeStyleRenderer
- Custom renderer instance for this style. If none is provided a new ShapeNodeStyleRenderer instance is used.
- stroke - Stroke
- fill - Fill
- shape - ShapeNodeShape
The shape for this style. This option sets the shape property on the created object.
- cssClass - string
A CSS class that will be applied to the visualization. This option sets the cssClass 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 CSS class that will be applied to the visualization.
Remarks
The default value is an empty string, in which case no class is set for the visualization.
Multiple classes can be set by separating them with spaces, just like with the SVG class
attribute.
See Also
Gets or sets the fill for this style.
Gets or sets a value indicating whether to keep the intrinsic aspect ratio of the shape.
Remarks
The intrinsic aspect ratio is determined by getIntrinsicAspectRatio.
The default value is false
. If enabled, the default implementation of getIntrinsicAspectRatio returns the intrinsic aspect ratio of the given shape.
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 node and this style instance.
Remarks
const creator = style.renderer.getVisualCreator(node, style)
const visual = creator.createVisual(context)
See Also
Implements
Gets or sets the shape for this style.
Methods
Create a clone of this object.