unpackVisibleHeadlines: go ahead of the buffer position a bit

master
Andrew Dolgov 6 years ago
parent 0c06bb5fe1
commit 58dee80ae5

@ -1008,11 +1008,12 @@ function unpackVisibleHeadlines() {
if (!isCdmMode()) return; if (!isCdmMode()) return;
const rows = $$("#headlines-frame div[id*=RROW][data-content]"); const rows = $$("#headlines-frame div[id*=RROW][data-content]");
const threshold = $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight + 100;
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
const row = rows[i]; const row = rows[i];
if (row.offsetTop <= $("headlines-frame").scrollTop + $("headlines-frame").offsetHeight) { if (row.offsetTop <= threshold) {
console.log("unpacking: " + row.id); console.log("unpacking: " + row.id);
const content = row.getAttribute("data-content"); const content = row.getAttribute("data-content");

Loading…
Cancel
Save