bug fix: textLayer ready still needs scroll
This commit is contained in:
parent
dd0cb37f38
commit
3bd20a7415
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user