Creates a new instance of ToolGroupToggleButton
Parameters:
| Name |
Type |
Description |
properties |
Object
|
An object that contains the properties of the ToolGroupToggleButton
Properties
| Name |
Type |
Argument |
Default |
Description |
dataElement |
string
|
<optional>
|
|
The data element of the button |
label |
string
|
<optional>
|
|
The label of the button |
img |
string
|
<optional>
|
|
The icon of the button |
style |
object
|
<optional>
|
|
An object defining inline CSS styles for the tool button, where each key represents a CSS property and its corresponding value |
className |
string
|
<optional>
|
|
String with CSS classes to be applied to the tool button, allowing additional styling and customization through external stylesheets |
groupedItems |
string
|
|
|
The name of the groupedItems element that this toggle button will control. When the button is toggled on, it will activate the last picked tool in this group. |
shouldToggleVisibility |
boolean
|
<optional>
|
true
|
Determines whether the visibility of the tools in the group should be toggled when the button is clicked |
|
Example
const customEllipseToolGroupToggleButton = new UI.Components.ToolGroupToggleButton({
dataElement: 'customEllipseToolGroupToggleButton',
groupedItems: 'customEllipseGroupedItems',
shouldToggleVisibility: true,
});