A base class for realisation of toolbars
Add a css class to the #toolbarHTMLElement, so some css settings can be overloaded for a specific toolbar
Name | Type | Description |
---|---|---|
cssClass | String | The css class to add |
Add a ToolbarItem on the collection of ToolbarItems
Name | Type | Description |
---|---|---|
toolbarItem | ToolbarItem | An object with data to configure the button |
Create the toolbar container and header
Name | Type | Description |
---|---|---|
headerText | String | The text to display on the header of the toolbar |
position | TOOLBAR_POSITION | The position of the toolbar on the screen |
The click event listener for the buttons
The touch event listener for the buttons
The HTML element that contains the buttons
The touch event listener for the buttons container
The wheel event listener for the buttons container
A boolean saving the the current state of the toolbar
The timestamp of the last mouseenter or click event
Timer id for the mouse leave event
The main HTMLElement of the toolbar
An object with the ToolbarItems array. Needed to have an object to share with EL.
The max delay between a mouseenter and a click event to consider the two events as a single event
Add a button to the toolbar
Name | Type | Description |
---|---|---|
toolbarItem | ToolbarItem | The toolbar item for witch the button will be created |
index | Number | The position of the toolbar item in the #toolbarItemsContainer.toolbarItemsArray |
Click on the toolbar event listener. It's needed for touch devices where the mouseenter EL don't work. Remember that toolbars are global objects never deleted, so we can have EL as simple member methods
Name | Type | Description |
---|---|---|
mouseEvent | Event | The trigered event |
Mouse enter on the toolbar event listener Remember that toolbars are global objects never deleted, so we can have EL as simple member methods
Name | Type | Description |
---|---|---|
mouseEvent | Event | The trigered event |
Mouse leave the toolbar event listener Remember that toolbars are global objects never deleted, so we can have EL as simple member methods