diff --git a/public/app/core/components/grafana_app.ts b/public/app/core/components/grafana_app.ts index 09326de6481..f48d941a8ba 100644 --- a/public/app/core/components/grafana_app.ts +++ b/public/app/core/components/grafana_app.ts @@ -122,18 +122,6 @@ export function grafanaAppDirective(playlistSrv, contextSrv) { body.toggleClass('page-kiosk-mode'); }); - var ticking = false; - window.addEventListener('scroll', function(e) { - if (!ticking) { - ticking = true; - setTimeout(function() { - appEvents.emit('scroll'); - ticking = false; - }, 100); - } - ticking = true; - }); - // handle in active view state class var lastActivity = new Date().getTime(); var activeUser = true; diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 8de78291baa..83c79f4123b 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -35,8 +35,6 @@ export class PanelCtrl { containerHeight: any; events: Emitter; timing: any; - skippedLastRefresh: boolean; - isPanelVisible: any; constructor($scope, $injector) { this.$injector = $injector; @@ -77,13 +75,6 @@ export class PanelCtrl { } refresh() { - if (!this.isPanelVisible() && !this.dashboard.meta.soloMode && !this.dashboard.snapshot) { - this.skippedLastRefresh = true; - return; - } - - this.skippedLastRefresh = false; - this.events.emit('refresh', null); } diff --git a/public/app/features/panel/panel_directive.ts b/public/app/features/panel/panel_directive.ts index c7ccbb62eab..1b6805179c0 100644 --- a/public/app/features/panel/panel_directive.ts +++ b/public/app/features/panel/panel_directive.ts @@ -186,23 +186,9 @@ module.directive('grafanaPanel', function($rootScope, $document) { elem.on('mouseenter', mouseEnter); elem.on('mouseleave', mouseLeave); - ctrl.isPanelVisible = function () { - var position = panelContainer[0].getBoundingClientRect(); - return (0 < position.top) && (position.top < window.innerHeight); - }; - - const refreshOnScroll = function () { - if (ctrl.skippedLastRefresh) { - ctrl.refresh(); - } - }; - - appEvents.on('scroll', refreshOnScroll, scope); - scope.$on('$destroy', function() { elem.off(); cornerInfoElem.off(); - $document.off('scroll', refreshOnScroll); if (infoDrop) { infoDrop.destroy();