mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Simple restructuring PageView into PDFPageView
This commit is contained in:
parent
863d583ae1
commit
f68678086d
4 changed files with 585 additions and 556 deletions
|
@ -197,8 +197,6 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|||
},
|
||||
|
||||
updatePage: function PDFFindController_updatePage(index) {
|
||||
var page = this.pdfViewer.getPageView(index);
|
||||
|
||||
if (this.selected.pageIdx === index) {
|
||||
// If the page is selected, scroll the page into view, which triggers
|
||||
// rendering the page, which adds the textLayer. Once the textLayer is
|
||||
|
@ -206,6 +204,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|||
this.pdfViewer.scrollPageIntoView(index + 1);
|
||||
}
|
||||
|
||||
var page = this.pdfViewer.getPageView(index);
|
||||
if (page.textLayer) {
|
||||
page.textLayer.updateMatches();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue