mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
Added find match counter
This commit is contained in:
parent
c27d3125bf
commit
17fe0b1470
5 changed files with 45 additions and 1 deletions
|
@ -116,7 +116,10 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|||
var queryLen = query.length;
|
||||
|
||||
if (queryLen === 0) {
|
||||
return; // Do nothing: the matches should be wiped out already.
|
||||
// Do nothing: the matches should be wiped out already.
|
||||
// Also, reset the result counter back to zero
|
||||
this.findBar.updateResultsCount();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!caseSensitive) {
|
||||
|
@ -139,6 +142,9 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|||
this.resumePageIdx = null;
|
||||
this.nextPageMatch();
|
||||
}
|
||||
|
||||
// Update the matches count
|
||||
this.findBar.updateResultsCount(this.pageMatches);
|
||||
},
|
||||
|
||||
extractText: function PDFFindController_extractText() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue