Last updated

API / geotoolkit / controls / toolbar / Button / Button

Namespace: Button

toolbar.Button.Button

Table of contents

Type Aliases

Contents

Type Aliases

ActionCallback

Ƭ ActionCallback: (tools: ToolsContainer, enabled: boolean) => void

Type declaration

▸ (tools, enabled): void

Is called when button is pressed.

Parameters
Name Type
toolsToolsContainer
enabledboolean
Returns

void


InitCallback

Ƭ InitCallback: (tools: ToolsContainer, enabled: boolean) => void

Type declaration

▸ (tools, enabled): void

Is called when button is initialized or cleared (disposed).

Parameters
Name Type
toolsToolsContainer
enabledboolean
Returns

void


Options

Ƭ Options: Object

button options

Type declaration

NameTypeDescription
action?ActionCallbackaction callback that is called when button is pressed. See ActionCallback documentation for more info.
border?stringbutton element css-border
checkbox?{ checked?: boolean ; enabled?: boolean ; name?: string | string[] }button checkbox options
checkbox.checked?booleantrue if button should be checked initially
checkbox.enabled?booleantrue 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?stringbutton element background color
element?HTMLElementhtml dom element to use as the button (instead of the new one creating by default)
height?numberfixed button height in pixels (if necessarily)
icon?stringcss class for the button icon span element
init?InitCallbackinitialization callback that is called when button is created or cleared. See InitCallback documentation for more info.
title?stringbutton title (DOM hover text)
width?numberfixed button width in pixels (if necessarily)