Move the call to |PDFFindController.resolveFirstPage| into PDFViewer

From reading IRC scrollback, it became clear that having to manually call `PDFFindController.resolveFirstPage` in order for the find functionality to work isn't particulary good. Hence this PR, which moves that code into `PDFViewer.setDocument` to make life easier for third-party implementations.
This commit is contained in:
Jonas Jenwald 2015-02-11 13:05:04 +01:00
parent ccf05c7a41
commit 8131440f9e
2 changed files with 4 additions and 2 deletions

View file

@ -306,6 +306,10 @@ var PDFViewer = (function pdfViewer() {
if (this.defaultRenderingQueue) {
this.update();
}
if (this.findController) {
this.findController.resolveFirstPage();
}
}.bind(this));
},