Node style implementation that can show predefined shapes of type ShapeNodeShape.
Remarks
For node visualizations in the shapes of arrows, parallelograms (sheared rectangles) and trapezoids, see the ArrowNodeStyle.
Type Details
- yFiles module
- view
Constructors
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- 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 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 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
The idiom for retrieving, e.g. an IVisualCreator implementation for a given style is:
const creator = style.renderer.getVisualCreator(node, style)
const visual = creator.createVisual(context)
Implements
Gets or sets the shape for this style.
Remarks
The default value is RECTANGLE.
Methods
Create a clone of this object.