From 96af4e0b4a13f361f41a5c4bfed3d2e573a14f73 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 20 Jan 2015 14:28:43 +0000 Subject: [PATCH] fix selection of prerender pages in pdf viewer --- .../web/public/coffee/ide/pdfng/directives/pdfViewer.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee b/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee index 6583072af7..ecb8c0f84f 100644 --- a/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee +++ b/services/web/public/coffee/ide/pdfng/directives/pdfViewer.coffee @@ -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