mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chrome: an attempt to fix scroll issue with chrome, but this did not fix the problem as it seems to be caused by some interaction between graph rendering and scrolling, #8494
This commit is contained in:
@@ -122,6 +122,18 @@ export function grafanaAppDirective(playlistSrv, contextSrv) {
|
|||||||
body.toggleClass('page-kiosk-mode');
|
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
|
// handle in active view state class
|
||||||
var lastActivity = new Date().getTime();
|
var lastActivity = new Date().getTime();
|
||||||
var activeUser = true;
|
var activeUser = true;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import angular from 'angular';
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import Drop from 'tether-drop';
|
import Drop from 'tether-drop';
|
||||||
|
import {appEvents} from 'app/core/core';
|
||||||
|
|
||||||
var module = angular.module('grafana.directives');
|
var module = angular.module('grafana.directives');
|
||||||
|
|
||||||
@@ -196,7 +197,7 @@ module.directive('grafanaPanel', function($rootScope, $document) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$document.on('scroll', refreshOnScroll);
|
appEvents.on('scroll', refreshOnScroll, scope);
|
||||||
|
|
||||||
scope.$on('$destroy', function() {
|
scope.$on('$destroy', function() {
|
||||||
elem.off();
|
elem.off();
|
||||||
|
|||||||
1
public/app/headers/common.d.ts
vendored
1
public/app/headers/common.d.ts
vendored
@@ -72,3 +72,4 @@ declare module 'd3' {
|
|||||||
var d3: any;
|
var d3: any;
|
||||||
export default d3;
|
export default d3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user