A node style for group nodes, that consists of a header and content portion.
Remarks
This is the WebGL2 version of GroupNodeStyle. Nodes that have the SVG version of this style set will be automatically converted to WebGLGroupNodeStyle
Note that unlike other INodeStyle implementations, this class is immutable. All properties are read-only and immutable, and the class cannot be subclassed, either.
Type Details
- yFiles module
- view
See Also
Constructors
WebGLGroupNodeStyle
(tabFill?: Color, contentAreaFill?: Color, tabBackgroundFill?: Color, stroke?: WebGLStroke, cornerRadius?: number, tabSlope?: number, tabWidth?: number, tabHeight?: number, tabPadding?: number, showFolderContentArea?: boolean, tabPosition?: GroupNodeStyleTabPosition, iconPosition?: GroupNodeStyleIconPosition, groupIcon?: GroupNodeStyleIconType, folderIcon?: GroupNodeStyleIconType, iconBackgroundShape?: GroupNodeStyleIconBackgroundShape, iconBackgroundFill?: Color, iconForegroundFill?: Color, iconSize?: number, iconOffset?: number, effect?: WebGLEffect, hitTransparentContentArea?: boolean, tabSizePolicy?: GroupNodeStyleTabSizePolicy, renderTransparentContentArea?: boolean)Creates a new group node style that is rendered with WebGL2.
Remarks
It consists of a tab part that visually acts as a header and a content part.
This style can be applied to nodes that are rendered by the WebGLGraphModelManager. The preferred way of calling the constructor is using option arguments, as there are many defaults and optional arguments.
Parameters
A map of options to pass to the method.
- tabFill - Color
- The main fill color of the node. Defaults to
rgb(170, 170, 170)
. - contentAreaFill - Color
- The fill color of the content area where child nodes are placed, defaults to WHITE
- tabBackgroundFill - Color
- The background fill color of the tab part, only applicable for tab positions that include a background such as TOP_TRAILING. Defaults to TRANSPARENT.
- stroke - WebGLStroke
- The stroke used for the outline. Defaults to no stroke./>
- cornerRadius - number
- The outer corner radius. Defaults to
4.0
. - tabSlope - number
- For split tab positions, defines the slope between fore- and background portions of the tab area. Defaults to
0.5
. - tabWidth - number
- Width of the tab portion. Only has an effect on split tab positions. Defaults to
50
. - tabHeight - number
- Height of the tab portion. Defaults to
18
. - tabPadding - number
- Determines distance between the content part and the outer portion of the style. Defaults to
4
- showFolderContentArea - boolean
- Whether to show the content area part. Defaults to
false
. - tabPosition - GroupNodeStyleTabPosition
- The position of the tab, such as LEFT_LEADING. Defaults to TOP.
- iconPosition - GroupNodeStyleIconPosition
- The position of the icon. This is independent of tabPosition. Defaults to TRAILING.
- groupIcon - GroupNodeStyleIconType
- The icon to be displayed. When displayed in an IFoldingView, this icon is shown for expanded nodes. Defaults to NONE.
- folderIcon - GroupNodeStyleIconType
- The icon to be displayed when the node is collapsed in an IFoldingView. Defaults to NONE.
- iconBackgroundShape - GroupNodeStyleIconBackgroundShape
- The background shape to use for the icon. Defaults to ROUND_RECTANGLE_SOLID.
- iconBackgroundFill - Color
- The fill color of the icon background shape. Defaults to white.
- iconForegroundFill - Color
- Fill color of icon itself. Defaults to
rgb(170, 170, 170)
. - iconSize - number
- The size of the icon, if any. Defaults to
14
. - iconOffset - number
- The offset of the icon to the outline of the style. Defaults to
0
. - effect - WebGLEffect
- The effect around the node. Defaults to NONE.
- hitTransparentContentArea - boolean
- Whether to make the content hit transparent. Defaults to
false
. - tabSizePolicy - GroupNodeStyleTabSizePolicy
- Determines how to calculate the size of the tab. Defaults to FIXED
- renderTransparentContentArea - boolean
- Whether to allow transparent Filles for the content area.
Properties
The fill color used for the content area.
Remarks
true
.The effect applied to this style.
The icon to be shown when the group node is collapsed in an IFoldingView.
See Also
The icon to be displayed.
Gets or sets a value indicating whether the content area is hit transparent.
Remarks
In this context, "hit transparent" means the area in question is not considered to be a part of the node for the purpose of hit testing, marquee selection testing, and lasso selection testing.
The "content area" is the area defined by the node's layout minus tabHeight from the tabPosition side and minus tabPadding from all sides.
The default value is false
.
The icon background shape.
The fill color used for the foreground of the icon.
The position of the icon.
The icon size.
Remarks
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)
Implements
Gets a value indicating whether to allow transparent Filles for the content area.
Remarks
This will "cut out" a hole in the group node visualization for the content area, instead of overlaying the content area over the rest of the visualization. Thus, transparency for contentAreaFill will show what is behind the node (e.g. background visualizations, parent group nodes, etc.).
The "content area" is the area defined by the node's layout minus tabHeight from the tabPosition side and minus tabPadding from all sides.
The default value is false
.
Whether the content area is shown.
The WebGLStroke used for drawing the outline of the shape.
The fill color used for the tab background.
Remarks
The tab background is only visible for tab positions TOP_LEADING, TOP_TRAILING, BOTTOM_LEADING, BOTTOM_TRAILING, LEFT_LEADING, LEFT_TRAILING, RIGHT_LEADING, and RIGHT_TRAILING, if tabWidth is less than the length of the side that shows the tab and tabHeight is greater than 0.0
.
Use a completely transparent color to show no background.
The padding of the content area on all sides.
Remarks
true
.The position of the tab.
Remarks
Gets or sets the policy that determines how to calculate the size of the tab.
Remarks
The size of the tab depends on the properties of the style and the size of the node. Additionally, the size of the tab may depend on the preferred width of tab or tab background labels.
The default value is FIXED. The size of the tab is determined by tabWidth and does not depend on tab or tab background labels in this case.
See Also
The width of the tab part.
Remarks
Methods
Create a clone of this object.