Class: ToolButton

UI.Components. ToolButton


new ToolButton(properties)

Creates a new instance of ToolButton.
Parameters:
Name Type Description
properties Object An object that contains the properties of the ToolButton.
Properties
Name Type Argument 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.
toolName Core.Tools.ToolNames | string <optional>
The name of the tool that the button activates. Refer to: Core.Tools.ToolNames
Example
const toolButton = new instance.UI.Components.ToolButton({
  label: 'Pan',
  title: 'Pan the document',
  img: 'icon-header-pan',
  toolName: 'Pan',
});

Extends