Tool
Base class for tools.
May be configured with a cls and a handler which is a function (or name of a function)
in the owning Panel.
Configs
77
Configs
77Common
Float & align
Specify 'start' to place the tool before the owner's central element (e.g., the title of the panel).
Other
The function to call when this tool is clicked. May be a function or function name
prepended by "up." that is resolvable in an ancestor component (such as an owning
Grid, Scheduler, Calendar, Gantt or TaskBoard)
| Parameter | Type | Description |
|---|---|---|
handler.event | Event | The DOM event which activated the tool |
handler.panel | Panel | The owning Panel of the tool |
handler.tool | Tool | The clicked Tool |
If provided, turns the tool into a link
A ClickRepeater config object to specify how click-and-hold gestures repeat the click action.
DOM
Layout
Misc
Scrolling
Properties
65
Properties
65Class hierarchy
CSS
DOM
Layout
Misc
Functions
58
Functions
58Configuration
Events
Misc
Other
Widget hierarchy
Events
16
Events
16Fires when the default action is performed (the button is clicked)
// Adding a listener using the "on" method
tool.on('action', ({ source, domEvent }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Tool | The Tool |
domEvent | Event | DOM event |
Fires when the tool is clicked
// Adding a listener using the "on" method
tool.on('click', ({ source, domEvent }) => {
});| Parameter | Type | Description |
|---|---|---|
source | Tool | The Tool |
domEvent | Event | DOM event |
Event handlers
16
Event handlers
16Called when the default action is performed (the button is clicked)
new Tool({
onAction({ source, domEvent }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Tool | The Tool |
domEvent | Event | DOM event |
Called when the tool is clicked
new Tool({
onClick({ source, domEvent }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | Tool | The Tool |
domEvent | Event | DOM event |