Commit 781d9b374605cab377f8e7abe31eaaf16af3dd29
tweak pull-scroll so it looks further ahead when dealing with unknown items
Matt McKegg committed on 10/31/2016, 10:45:56 AMParent: 9a25a4f3e7287e903910920950272bb4668424d2
Files changed
lib/pull-scroll.js | changed |
lib/pull-scroll.js | ||
---|---|---|
@@ -23,9 +23,9 @@ | ||
23 | 23 | // && content.getBoundingClientRect().height == 0 |
24 | 24 | //and has children. if there are no children, |
25 | 25 | //it might be size zero because it hasn't started yet. |
26 | 26 | // && |
27 | - && content.children.length > 10 | |
27 | + && content.children.length > 20 | |
28 | 28 | //&& !isVisible(scroller) |
29 | 29 | ) |
30 | 30 | } |
31 | 31 | |
@@ -106,13 +106,13 @@ | ||
106 | 106 | queue.push(e) |
107 | 107 | //we don't know the scroll bar positions if it's display none |
108 | 108 | //so we have to wait until it becomes visible again. |
109 | 109 | if(!isVisible(content)) { |
110 | - if(content.children.length < 10) add() | |
110 | + if(content.children.length < 20) add() | |
111 | 111 | } |
112 | 112 | else if(isEnd(scroller, buffer, top)) add() |
113 | 113 | |
114 | - if(queue.length > 5) pause.pause() | |
114 | + if(queue.length > 10) pause.pause() | |
115 | 115 | }, function (err) { |
116 | 116 | scroller.removeEventListener('scroll', scroll) |
117 | 117 | if(err) console.error(err) |
118 | 118 | cb ? cb(err) : console.error(err) |
Built with git-ssb-web