An implementation of INodeStyle that draws a floating panel with a slight gradient, a thin border and optionally a drop shadow.
Remarks
This style can be used to create the visual representation for group nodes, for example. By default, this style renders a drop shadow.
This style uses the PanelNodeStyleRenderer to visualize a node.
Type Details
- yfiles module
- styles-other
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.styles.PanelNodeStyle
See Also
Deprecation warning
Use GroupNodeStyle, or implement this as a custom style instead. If you really need to use this style, please contact us.Constructors
Creates a new instance using the provided renderer to share.
Parameters
A map of options to pass to the method.
- renderer - PanelNodeStyleRenderer
- The renderer to be used with this style. If none is provided, a new instance of PanelNodeStyleRenderer is used.
- color - Color
The base color to use. This option sets the color property on the created object.
- labelInsetsColor - Color
The base color to use for drawing the label insets background. This option sets the labelInsetsColor property on the created object.
- insets - Insets
The instance to use that provides the insets for this style. This option sets the insets property on the created object.
Properties
Gets or sets the instance to use that provides the insets for this style.
Remarks
The PanelNodeStyleRenderer will use these insets and return them via an INodeInsetsProvider if such an instance is queried through the context lookup.
The default insets are set to (5,5,5,5).
See Also
Gets or sets the base color to use for drawing the label insets background.
Remarks
Setting this to null
effectively disables label insets background coloring.
The default value is LIGHT_GRAY.
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
Methods
Create a clone of this object.