renamed action

This commit is contained in:
Daniel Herrero 2018-04-30 14:00:09 +02:00
parent 628dd5a99b
commit 33f7b2d45a
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ class AutoPaging {
checkPosition() {
let element = this.$element[0].querySelector('vn-spinner');
let position = element.getBoundingClientRect();
if (this.currentPage < this.numPages && position.y < document.body.offsetHeight + 150 && !this.waitingNewPage) {
let isVisible = position.y < document.body.offsetHeight + 150;
if (this.currentPage < this.numPages && isVisible && !this.waitingNewPage) {
this.loadNewPage();
}
}