mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 18:13:57 +08:00
21 lines
468 B
TypeScript
21 lines
468 B
TypeScript
import GeminiScrollbar from 'gemini-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();
|
|
|
|
scope.$on('$destroy', () => {
|
|
myScrollbar.destroy();
|
|
});
|
|
}
|
|
};
|
|
}
|
|
|
|
coreModule.directive('geminiScrollbar', geminiScrollbar);
|