mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 18:53:58 +08:00
20 lines
409 B
TypeScript
20 lines
409 B
TypeScript
import PerfectScrollbar from 'perfect-scrollbar';
|
|
import coreModule from 'app/core/core_module';
|
|
|
|
export function geminiScrollbar() {
|
|
return {
|
|
restrict: 'A',
|
|
link: function(scope, elem, attrs) {
|
|
|
|
let scrollbar = new PerfectScrollbar(elem[0]);
|
|
|
|
scope.$on('$destroy', () => {
|
|
scrollbar.destroy();
|
|
});
|
|
|
|
}
|
|
};
|
|
}
|
|
|
|
coreModule.directive('grafanaScrollbar', geminiScrollbar);
|