git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

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 AM
Parent: 9a25a4f3e7287e903910920950272bb4668424d2

Files changed

lib/pull-scroll.jschanged
lib/pull-scroll.jsView
@@ -23,9 +23,9 @@
2323 // && content.getBoundingClientRect().height == 0
2424 //and has children. if there are no children,
2525 //it might be size zero because it hasn't started yet.
2626 // &&
27- && content.children.length > 10
27+ && content.children.length > 20
2828 //&& !isVisible(scroller)
2929 )
3030 }
3131
@@ -106,13 +106,13 @@
106106 queue.push(e)
107107 //we don't know the scroll bar positions if it's display none
108108 //so we have to wait until it becomes visible again.
109109 if(!isVisible(content)) {
110- if(content.children.length < 10) add()
110+ if(content.children.length < 20) add()
111111 }
112112 else if(isEnd(scroller, buffer, top)) add()
113113
114- if(queue.length > 5) pause.pause()
114+ if(queue.length > 10) pause.pause()
115115 }, function (err) {
116116 scroller.removeEventListener('scroll', scroll)
117117 if(err) console.error(err)
118118 cb ? cb(err) : console.error(err)

Built with git-ssb-web