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 WebGL2GroupNodeStyle
Note that unlike INodeStyle implementations, this class is immutable and cannot be used with setStyle. All properties are read-only and immutable and the class cannot be subclassed, either. Its sole purpose is to be used with the setStyle method of WebGL2GraphModelManager.
Type Details
- yfiles module
- view-webgl
- yfiles-umd modules
- view-webgl, view
- Legacy UMD name
- yfiles.view.WebGL2GroupNodeStyle
See Also
Constructors
WebGL2GroupNodeStyle
(tabFill?: Color, contentAreaFill?: Color, tabBackgroundFill?: Color, stroke?: WebGL2Stroke, cornerRadius?: number, tabSlope?: number, tabWidth?: number, tabHeight?: number, tabInset?: number, showFolderContentArea?: boolean, tabPosition?: GroupNodeStyleTabPosition, iconPosition?: GroupNodeStyleIconPosition, groupIcon?: GroupNodeStyleIconType, folderIcon?: GroupNodeStyleIconType, iconBackgroundShape?: GroupNodeStyleIconBackgroundShape, iconBackgroundFill?: Color, iconForegroundFill?: Color, iconSize?: number, iconOffset?: number, effect?: WebGL2Effect, 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 WebGL2GraphModelManager. 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 - WebGL2Stroke
- 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
. - tabInset - 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 - WebGL2Effect
- 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 tabInset 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 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 tabInset from all sides.
The default value is false
.
Whether the content area is shown.
The WebGL2Stroke 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 inset that shrinks 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.