未验证 提交 c85204dc 编写于 作者: Z zenghsh3 提交者: GitHub

fix bug of monitoring page (#362)

solve #362 
上级 0915559a
......@@ -61,17 +61,15 @@
}, 10000);
$(window).on("scroll", function() {
if (monitor === 1) {
var scrollTop = $(document).scrollTop();
var windowHeight = $(window).height();
var bodyHeight = $(document).height() - windowHeight;
var scrollPercentage = scrollTop / bodyHeight;
if (scrollPercentage > 0.25) {
if (div_num < res.workers.length) {
div_num += delta;
createDivs(res, div_num);
addPlots(res, record, imgHandle, div_num - delta, div_num);
}
var scrollTop = $(document).scrollTop();
var windowHeight = $(window).height();
var bodyHeight = $(document).height() - windowHeight;
var scrollPercentage = scrollTop / bodyHeight;
if (scrollPercentage > 0.25) {
if (div_num < res.workers.length) {
div_num += delta;
createDivs(res, div_num);
addPlots(res, record, imgHandle, div_num - delta, div_num);
}
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册