[]
Type representing a viewer's toolbar instance.
desktop: ToolbarItems;
Desktop layout toolbar items.
viewer.toolbar.desktop.addItem({
key: 'coolButton',
title: 'Cool Button',
iconCssClass: 'mdi mdi-emoticon-cool',
action: () => {
console.log('Cool!');
}}
)
fullscreen: ToolbarItems;
Fullscreen mode toolbar items.
viewer.toolbar.fullscreen.addItem({
key: 'fishButton',
title: 'Fish',
iconCssClass: 'mdi mdi-fish',
action: () => {
console.log('Just a fish.');
}}
)
mobile: ToolbarItems;
Mobile layout toolbar items.
viewer.toolbar.mobile.addItem({
key: 'pizzaButton',
title: 'Cool Pizza',
iconCssClass: 'mdi mdi-pizza',
action: () => {
console.log('Pizza Time!');
}}
)
toggle: (show?) => void;
Toggles the toolbar visibility.
boolean
Pass true to switch toolbar ON, and vise-versa. Do not pass any value to toggle visibility.
void
viewer.toolbar.toggle(false); // hide toolbar