Commit 4df4249a by Alexander Zobnin

scrollbar: fix dashboard width bug

parent 6b598f34
...@@ -27,14 +27,17 @@ export function geminiScrollbar() { ...@@ -27,14 +27,17 @@ export function geminiScrollbar() {
$(scrollBarHTML).appendTo(scrollRoot); $(scrollBarHTML).appendTo(scrollRoot);
elem.addClass(scrollerClass); elem.addClass(scrollerClass);
let scrollbar = baron({ let scrollParams = {
root: scrollRoot[0], root: scrollRoot[0],
scroller: scroller[0], scroller: scroller[0],
bar: '.baron__bar', bar: '.baron__bar',
barOnCls: '_scrollbar', barOnCls: '_scrollbar',
scrollingCls: '_scrolling', scrollingCls: '_scrolling',
track: '.baron__track', track: '.baron__track',
}); direction: 'v',
};
let scrollbar = baron(scrollParams);
let lastPos = 0; let lastPos = 0;
...@@ -57,6 +60,11 @@ export function geminiScrollbar() { ...@@ -57,6 +60,11 @@ export function geminiScrollbar() {
scope scope
); );
appEvents.on('toggle-sidemenu', evt => {
// force updating dashboard width
scrollbar.scroll();
});
scope.$on('$routeChangeSuccess', () => { scope.$on('$routeChangeSuccess', () => {
lastPos = 0; lastPos = 0;
elem[0].scrollTop = 0; elem[0].scrollTop = 0;
......
...@@ -196,13 +196,8 @@ ...@@ -196,13 +196,8 @@
} }
// Fix for side menu on mobile devices // Fix for side menu on mobile devices
.sidemenu-open.sidemenu-open--xs {
.main-view.baron {
min-width: 0%;
}
}
.main-view.baron { .main-view.baron {
min-width: 99%; min-width: unset;
} }
.baron__clipper { .baron__clipper {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment