mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fix selection of prerender pages in pdf viewer
This commit is contained in:
parent
f18f862be2
commit
96af4e0b4a
1 changed files with 2 additions and 2 deletions
|
@ -265,13 +265,13 @@ define [
|
|||
lastVisiblePage = visiblePages[len-1].pageNum
|
||||
lastVisiblePageIdx = lastVisiblePage - 1
|
||||
# first page after
|
||||
if lastVisiblePageIdx + 1 < len
|
||||
if lastVisiblePageIdx + 1 < scope.pages.length
|
||||
extra.push scope.pages[lastVisiblePageIdx + 1]
|
||||
# page before
|
||||
if firstVisiblePageIdx > 0
|
||||
extra.push scope.pages[firstVisiblePageIdx - 1]
|
||||
# second page after
|
||||
if lastVisiblePageIdx + 2 < len
|
||||
if lastVisiblePageIdx + 2 < scope.pages.length
|
||||
extra.push scope.pages[lastVisiblePageIdx + 2]
|
||||
return visiblePages.concat extra
|
||||
|
||||
|
|
Loading…
Reference in a new issue