API / geotoolkit / controls / toolbar / Button / Button
Type Aliases
Type Aliases
Ƭ ActionCallback: (tools: ToolsContainer, enabled: boolean) => void
▸ (tools, enabled): void
Is called when button is pressed.
| Name | Type |
|---|---|
tools | ToolsContainer |
enabled | boolean |
void
Ƭ InitCallback: (tools: ToolsContainer, enabled: boolean) => void
▸ (tools, enabled): void
Is called when button is initialized or cleared (disposed).
| Name | Type |
|---|---|
tools | ToolsContainer |
enabled | boolean |
void
Ƭ Options: Object
button options
| Name | Type | Description |
|---|---|---|
action? | ActionCallback | action callback that is called when button is pressed. See ActionCallback documentation for more info. |
border? | string | button element css-border |
checkbox? | { checked?: boolean ; enabled?: boolean ; name?: string | string[] } | button checkbox options |
checkbox.checked? | boolean | true if button should be checked initially |
checkbox.enabled? | boolean | true if button should act like checkbox (toggling .cg-toolbar-checked css class, use it to change the default style) |
checkbox.name? | string | string[] | name(s) that is used as the group id among the checkbox buttons. When user turns on one button from the group, all the others are automatically turned off. So the button becomes a 'radio' button. |
color? | string | button element background color |
element? | HTMLElement | html dom element to use as the button (instead of the new one creating by default) |
height? | number | fixed button height in pixels (if necessarily) |
icon? | string | css class for the button icon span element |
init? | InitCallback | initialization callback that is called when button is created or cleared. See InitCallback documentation for more info. |
title? | string | button title (DOM hover text) |
width? | number | fixed button width in pixels (if necessarily) |