new Toolbar(config)
Creates a Toolbar object.
It is usually up to the current Layer to define its own Toolbar (and thus, its own ToolbarActions).
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
config |
Object | The configuration object Properties
|
- Source:
- ui/ui.Toolbar.js
- See:
Methods
-
close()
-
Closes the Toolbar
- Source:
- ui/ui.Toolbar.js
-
destroy()
-
Destroys the Toolbar, unbind all events and associated UI elements
- Source:
- ui/ui.Toolbar.js
-
disable()
-
Disables the Toolbar (blocks possible user interaction with it)
- Source:
- ui/ui.Toolbar.js
-
enable()
-
Enables the Toolbar (allow user interaction with it)
- Source:
- ui/ui.Toolbar.js
-
open(editable)
-
Opens the Toolbar on the passed Editable; this will call first Granite.author.ui.Toolbar#render and then Granite.author.ui.Toolbar#position
Parameters:
Name Type Description editable
Granite.author.Editable the source Editable
- Source:
- ui/ui.Toolbar.js
-
position(editable)
-
Position the Toolbar on the passed Editable
Parameters:
Name Type Description editable
Granite.author.Editable the source Editable
- Source:
- ui/ui.Toolbar.js
Returns:
- the current Toolbar
-
registerAction(name, action)
-
Adds a new global action (available for all Editables)
Parameters:
Name Type Description name
String unique name for the action
action
Granite.author.ui.ToolbarAction describes the action to be added on the Toolbar
- Source:
- ui/ui.Toolbar.js
-
render(editable)
-
Renders the Toolbar and appends the buttons associated with the actions contained in the current configuration
Parameters:
Name Type Description editable
Granite.author.Editable the source Editable
- Source:
- ui/ui.Toolbar.js
Returns:
- the current Toolbar
-
reposition()
-
Repositions the Toolbar on its current underlying Editable (if existing)
- Source:
- ui/ui.Toolbar.js