mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
scrollbar: fix dashboard width bug
This commit is contained in:
parent
6b598f34cd
commit
4df4249aea
@ -27,14 +27,17 @@ export function geminiScrollbar() {
|
||||
$(scrollBarHTML).appendTo(scrollRoot);
|
||||
elem.addClass(scrollerClass);
|
||||
|
||||
let scrollbar = baron({
|
||||
let scrollParams = {
|
||||
root: scrollRoot[0],
|
||||
scroller: scroller[0],
|
||||
bar: '.baron__bar',
|
||||
barOnCls: '_scrollbar',
|
||||
scrollingCls: '_scrolling',
|
||||
track: '.baron__track',
|
||||
});
|
||||
direction: 'v',
|
||||
};
|
||||
|
||||
let scrollbar = baron(scrollParams);
|
||||
|
||||
let lastPos = 0;
|
||||
|
||||
@ -57,6 +60,11 @@ export function geminiScrollbar() {
|
||||
scope
|
||||
);
|
||||
|
||||
appEvents.on('toggle-sidemenu', evt => {
|
||||
// force updating dashboard width
|
||||
scrollbar.scroll();
|
||||
});
|
||||
|
||||
scope.$on('$routeChangeSuccess', () => {
|
||||
lastPos = 0;
|
||||
elem[0].scrollTop = 0;
|
||||
|
@ -196,13 +196,8 @@
|
||||
}
|
||||
|
||||
// Fix for side menu on mobile devices
|
||||
.sidemenu-open.sidemenu-open--xs {
|
||||
.main-view.baron {
|
||||
min-width: 0%;
|
||||
}
|
||||
}
|
||||
.main-view.baron {
|
||||
min-width: 99%;
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
.baron__clipper {
|
||||
|
Loading…
Reference in New Issue
Block a user