mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboard: lazy loading panels as they become visible,fix, removed debunce #5216
This commit is contained in:
@@ -180,11 +180,11 @@ module.directive('grafanaPanel', function($rootScope, $document) {
|
|||||||
return (0 < position.top) && (position.top < window.innerHeight);
|
return (0 < position.top) && (position.top < window.innerHeight);
|
||||||
};
|
};
|
||||||
|
|
||||||
const refreshOnScroll = _.debounce(function () {
|
const refreshOnScroll = function () {
|
||||||
if (ctrl.skippedLastRefresh) {
|
if (ctrl.skippedLastRefresh) {
|
||||||
ctrl.refresh();
|
ctrl.refresh();
|
||||||
}
|
}
|
||||||
}, 250);
|
};
|
||||||
|
|
||||||
$document.on('scroll', refreshOnScroll);
|
$document.on('scroll', refreshOnScroll);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user