bug fix: textLayer ready still needs scroll

This commit is contained in:
Artur Adib 2012-10-02 16:19:51 -04:00
parent dd0cb37f38
commit 3bd20a7415

View File

@ -323,14 +323,16 @@ var PDFFindController = {
updatePage: function(idx) {
var page = PDFView.pages[idx];
if (page.textLayer) {
page.textLayer.updateMatches();
} else if (this.selected.pageIdx === idx) {
if (this.selected.pageIdx === idx) {
// If the page is selected, scroll the page into view, which triggers
// rendering the page, which adds the textLayer. Once the textLayer is
// build, it will scroll onto the selected match.
page.scrollIntoView();
}
if (page.textLayer) {
page.textLayer.updateMatches();
}
},
performFind: function() {