Commit eef3120a by Daniel Lee

Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into…

Merge branch 'fix-11053' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-fix-11053
parents eea23699 175937a6
......@@ -152,7 +152,6 @@
"moment": "^2.18.1",
"mousetrap": "^1.6.0",
"mousetrap-global-bind": "^1.1.0",
"perfect-scrollbar": "^1.2.0",
"prop-types": "^15.6.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
......
......@@ -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;
......
......@@ -19,7 +19,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
scope.$on('$destroy', function() {
if (legendScrollbar) {
legendScrollbar.destroy();
legendScrollbar.dispose();
}
});
......
......@@ -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 {
......
......@@ -1162,6 +1162,10 @@ balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
baron@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/baron/-/baron-3.0.3.tgz#0f0a08a567062882e130a0ecfd41a46d52103f4a"
base64-arraybuffer@0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8"
......@@ -7503,10 +7507,6 @@ pend@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
perfect-scrollbar@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/perfect-scrollbar/-/perfect-scrollbar-1.2.0.tgz#ad23a2529c17f4535f21d1486f8bc3046e31a9d2"
performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
......
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