fix(PublicPage): infinite scrolling last page issue
This commit is contained in:
parent
922b3caa28
commit
c1d2457bff
1 changed files with 5 additions and 7 deletions
|
@ -254,6 +254,7 @@ function renderMosaic(data) {
|
|||
// 1 - parse all the data
|
||||
// 2 - for each
|
||||
currentOrganizations = data
|
||||
page = 0
|
||||
pageCount = Math.floor(data.length / elementsPerPage)
|
||||
renderPage()
|
||||
if (currentCardContainer !== null) {
|
||||
|
@ -264,15 +265,12 @@ function renderMosaic(data) {
|
|||
}
|
||||
|
||||
window.onscroll = () => {
|
||||
if (focusPoint != null) {
|
||||
//console.log(isVisible(focusPoint))
|
||||
if (isVisible(focusPoint) && !rendering) {
|
||||
if ((page + 1) < pageCount) {
|
||||
if (focusPoint != null && isVisible(focusPoint) && !rendering) {
|
||||
if (page + 1 < pageCount + 1) {
|
||||
page++
|
||||
renderPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue