Commit 6e8c9cc4 authored by Randall Leeds's avatar Randall Leeds

Use public interface for PDF page view access

This becomes necessary as a result of the change introduced by
mozilla/pdf.js@b1c4b85d4fb7faba2b454d02d279644244bf282b

This method has existed for a long time so hopefully this won't
cause breakage for anyone on a slightly older FF.
parent 41a7ea6a
...@@ -24,7 +24,7 @@ getNodeTextLayer = (node) -> ...@@ -24,7 +24,7 @@ getNodeTextLayer = (node) ->
getPage = (pageIndex) -> getPage = (pageIndex) ->
return PDFViewerApplication.pdfViewer.pages[pageIndex] return PDFViewerApplication.pdfViewer.getPageView(pageIndex)
getPageTextContent = (pageIndex) -> getPageTextContent = (pageIndex) ->
......
...@@ -66,7 +66,10 @@ class PDF extends Annotator.Plugin ...@@ -66,7 +66,10 @@ class PDF extends Annotator.Plugin
refreshAnnotations = [] refreshAnnotations = []
# Check all the pages with text layers that have finished rendering. # Check all the pages with text layers that have finished rendering.
for page in pdfViewer.pages when page.textLayer?.renderingDone for pageIndex in [0...pdfViewer.pagesCount]
page = pdfViewer.getPageView(pageIndex)
continue unless page.textLayer?.renderingDone
div = page.div ? page.el div = page.div ? page.el
placeholder = div.getElementsByClassName('annotator-placeholder')[0] placeholder = div.getElementsByClassName('annotator-placeholder')[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment