ToolBarToolComponent

Represents the Base ToolBar Tool component for Angular.
Extend this class to create custom tools.

Selector

toolbar-tool

Methods

canFocus

Determines if the tool can be focused.
If the returned value is false, the tool will not be part of the keyboard navigation.

Returns

boolean true if the tool should take part in keyboard navigation.

focus

Called when the tool is focused.
The method accepts as argument the original browser event, which can be a KeyboardEvent, MouseEvent or FocusEvent.

Parameters

ev? Event

This is the event that caused the tool to be focused.

handleKey

Called when the tool is focused and one of the arrow keys is pressed.
The returned boolean value determines whether the ToolBarComponent will move the focus to the next/previous ToolBarToolComponent
(see example).

Parameters

ev KeyboardEvent

The last pressed arrow key

Returns

boolean