mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
New TV Mode, dashboard toolbar update (layout change & new cycle view mode button) (#13025)
* wip: design update for navbar with kiosk mode button * feat: progress on new view mode button * css: view state refactorings * feat: kiosk modes & playlist support * feature: cycle tv mode feature, renamed view modes to TV, and Kiosk * fix: updated the alert notification message * fix: removed unused parameter * fix: correct the css class set for tv mode * some minor improvements to playlist
This commit is contained in:
@@ -842,12 +842,20 @@ export class DashboardModel {
|
||||
})
|
||||
);
|
||||
|
||||
// Consider navbar and submenu controls, padding and margin
|
||||
let visibleHeight = window.innerHeight - 55 - 20;
|
||||
const navbarHeight = 55;
|
||||
const margin = 20;
|
||||
const submenuHeight = 50;
|
||||
|
||||
// Remove submenu if visible
|
||||
if (this.meta.submenuEnabled) {
|
||||
visibleHeight -= 50;
|
||||
let visibleHeight = viewHeight - navbarHeight - margin;
|
||||
|
||||
// Remove submenu height if visible
|
||||
if (this.meta.submenuEnabled && !this.meta.kiosk) {
|
||||
visibleHeight -= submenuHeight;
|
||||
}
|
||||
|
||||
// add back navbar height
|
||||
if (this.meta.kiosk === 'b') {
|
||||
visibleHeight += 55;
|
||||
}
|
||||
|
||||
const visibleGridHeight = Math.floor(visibleHeight / (GRID_CELL_HEIGHT + GRID_CELL_VMARGIN));
|
||||
|
||||
Reference in New Issue
Block a user