pull-scroll
Advanced tools
+5
-4
@@ -69,5 +69,2 @@ var pull = require('pull-stream') | ||
| if(scroller.scrollHeight < window.innerHeight) | ||
| add() | ||
| if (isVisible(content)) { | ||
@@ -77,2 +74,7 @@ if (isEnd(scroller, buffer, isPrepend)) | ||
| } | ||
| else { | ||
| if(scroller.scrollHeight < window.innerHeight && content.children.length < 10) { | ||
| add() | ||
| } | ||
| } | ||
@@ -125,2 +127,1 @@ if(queue.length > 5) | ||
+1
-1
| { | ||
| "name": "pull-scroll", | ||
| "description": "", | ||
| "version": "1.0.8", | ||
| "version": "1.0.9", | ||
| "homepage": "https://github.com/dominictarr/pull-scroll", | ||
@@ -6,0 +6,0 @@ "repository": { |
+8
-2
@@ -25,5 +25,8 @@ | ||
| function isVisible(el) { | ||
| function isVisible (el) { | ||
| if(!el) return false | ||
| if(el === document.body) return true | ||
| var style = getComputedStyle(el) | ||
| return style.visibility !== 'hidden' | ||
| if(style.visibility === 'hidden' || style.display === 'none') return false | ||
| return isVisible(el.parentElement) | ||
| } | ||
@@ -58,1 +61,4 @@ | ||
| } | ||
Sorry, the diff of this file is not supported yet
12186
1.98%244
2.52%