Skip to content
Snippets Groups Projects
Commit 7bced9ac authored by Henrik Askjer's avatar Henrik Askjer
Browse files

load new articles after scrolling one screen height

parent e6e50172
No related branches found
No related tags found
No related merge requests found
...@@ -434,6 +434,12 @@ export default { ...@@ -434,6 +434,12 @@ export default {
if (window.pageYOffset > this.max_scroll && window.pageYOffset > window.window.innerHeight) { if (window.pageYOffset > this.max_scroll && window.pageYOffset > window.window.innerHeight) {
this.max_scroll = document.body.scrollHeight - window.window.innerHeight-1 this.max_scroll = document.body.scrollHeight - window.window.innerHeight-1
console.log("MAX", this.max_scroll) console.log("MAX", this.max_scroll)
this.max_scroll += window.window.innerHeight
if (this.max_scroll > document.body.scrollHeight - window.window.innerHeight-1) {
this.max_scroll = document.body.scrollHeight - window.window.innerHeight-1
}
let offset = 10 * this.page let offset = 10 * this.page
this.page += 1 this.page += 1
if (!self.waiting_for_articles) { if (!self.waiting_for_articles) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment