mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #10201 from Snuffleupagus/find-less-updatePage
Reduce the number of redundant `updatetextlayermatches` events dispatched when calculating matches in `PDFFindController`
This commit is contained in:
commit
bb5f261c58
1 changed files with 5 additions and 1 deletions
|
@ -345,7 +345,11 @@ class PDFFindController {
|
|||
this._calculateWordMatch(query, pageIndex, pageContent, entireWord);
|
||||
}
|
||||
|
||||
this._updatePage(pageIndex);
|
||||
// When `highlightAll` is set, ensure that the matches on previously
|
||||
// rendered (and still active) pages are correctly highlighted.
|
||||
if (this._state.highlightAll) {
|
||||
this._updatePage(pageIndex);
|
||||
}
|
||||
if (this._resumePageIdx === pageIndex) {
|
||||
this._resumePageIdx = null;
|
||||
this._nextPageMatch();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue