diff --git a/package.json b/package.json index 02576cdcbef..e96f9bd78a5 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,6 @@ "d3-scale-chromatic": "^1.1.1", "eventemitter3": "^2.0.2", "file-saver": "^1.3.3", - "gemini-scrollbar": "https://github.com/grafana/gemini-scrollbar#grafana", "jquery": "^3.2.1", "lodash": "^4.17.4", "moment": "^2.18.1", diff --git a/public/app/core/components/scroll/scroll.ts b/public/app/core/components/scroll/scroll.ts index 9ccab431256..a43ef59ec84 100644 --- a/public/app/core/components/scroll/scroll.ts +++ b/public/app/core/components/scroll/scroll.ts @@ -1,20 +1,20 @@ -import GeminiScrollbar from 'gemini-scrollbar'; +import PerfectScrollbar from 'perfect-scrollbar'; import coreModule from 'app/core/core_module'; export function geminiScrollbar() { return { restrict: 'A', link: function(scope, elem, attrs) { - var myScrollbar = new GeminiScrollbar({ - autoshow: false, - element: elem[0] - }).create(); + + let scrollbar = new PerfectScrollbar(elem[0]); + console.log('scrllbar!'); scope.$on('$destroy', () => { - myScrollbar.destroy(); + scrollbar.destroy(); }); + } }; } -coreModule.directive('geminiScrollbar', geminiScrollbar); +coreModule.directive('grafanaScrollbar', geminiScrollbar); diff --git a/public/app/core/components/search/search.html b/public/app/core/components/search/search.html index 7cd7628282f..cbdd3a94b1b 100644 --- a/public/app/core/components/search/search.html +++ b/public/app/core/components/search/search.html @@ -40,51 +40,49 @@
-
- diff --git a/public/app/features/admin/partials/configuration_home.html b/public/app/features/admin/partials/configuration_home.html index 0d56497cdde..19f6cae770f 100644 --- a/public/app/features/admin/partials/configuration_home.html +++ b/public/app/features/admin/partials/configuration_home.html @@ -1,35 +1,33 @@ -
-
- - diff --git a/public/app/features/panel/panel_directive.ts b/public/app/features/panel/panel_directive.ts index ba70990126c..2e183e70b4a 100644 --- a/public/app/features/panel/panel_directive.ts +++ b/public/app/features/panel/panel_directive.ts @@ -102,9 +102,7 @@ module.directive('grafanaPanel', function($rootScope, $document) { // update scrollbar after mounting ctrl.events.on('component-did-mount', () => { if (ctrl.__proto__.constructor.scrollable) { - panelScrollbar = new PerfectScrollbar(panelContent[0], { - minScrollbarLength: 20 - }); + panelScrollbar = new PerfectScrollbar(panelContent[0]); } }); @@ -191,6 +189,10 @@ module.directive('grafanaPanel', function($rootScope, $document) { if (infoDrop) { infoDrop.destroy(); } + + if (panelScrollbar) { + panelScrollbar.update(); + } }); } }; diff --git a/public/app/features/plugins/partials/ds_edit.html b/public/app/features/plugins/partials/ds_edit.html index e039fbd83ae..58396e816b3 100644 --- a/public/app/features/plugins/partials/ds_edit.html +++ b/public/app/features/plugins/partials/ds_edit.html @@ -1,90 +1,88 @@ -
-
- -
-