mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Merge pull request #10182 from Snuffleupagus/TextLayerBuilder-rm-findController-checks
Small clean-up of the search related methods in `TextLayerBuilder`
This commit is contained in:
commit
04ce2afd4a
2 changed files with 45 additions and 62 deletions
|
@ -149,7 +149,7 @@ class PDFFindController {
|
|||
this._highlightMatches = false;
|
||||
this._pdfDocument = null;
|
||||
this._pageMatches = [];
|
||||
this._pageMatchesLength = null;
|
||||
this._pageMatchesLength = [];
|
||||
this._state = null;
|
||||
this._selected = { // Currently selected match.
|
||||
pageIdx: -1,
|
||||
|
@ -304,9 +304,6 @@ class PDFFindController {
|
|||
}
|
||||
|
||||
// Prepare arrays for storing the matches.
|
||||
if (!this._pageMatchesLength) {
|
||||
this._pageMatchesLength = [];
|
||||
}
|
||||
this._pageMatchesLength[pageIndex] = [];
|
||||
this._pageMatches[pageIndex] = [];
|
||||
|
||||
|
@ -417,7 +414,7 @@ class PDFFindController {
|
|||
this._offset.matchIdx = null;
|
||||
this._resumePageIdx = null;
|
||||
this._pageMatches.length = 0;
|
||||
this._pageMatchesLength = null;
|
||||
this._pageMatchesLength.length = 0;
|
||||
this._matchesCountTotal = 0;
|
||||
|
||||
for (let i = 0; i < numPages; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue