|
|
|
@ -301,7 +301,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
@@ -301,7 +301,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|
|
|
|
if (this.pagesToSearch < 0) { |
|
|
|
|
// No point in wrapping again, there were no matches.
|
|
|
|
|
this.updateMatch(false); |
|
|
|
|
// while matches were not found, searching for a page
|
|
|
|
|
// while matches were not found, searching for a page
|
|
|
|
|
// with matches should nevertheless halt.
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -354,7 +354,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
@@ -354,7 +354,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|
|
|
|
offset.matchIdx = null; |
|
|
|
|
|
|
|
|
|
this.pagesToSearch--; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (offset.pageIdx >= numPages || offset.pageIdx < 0) { |
|
|
|
|
offset.pageIdx = (previous ? numPages - 1 : 0); |
|
|
|
|
offset.wrapped = true; |
|
|
|
@ -365,7 +365,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
@@ -365,7 +365,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|
|
|
|
var state = FindStates.FIND_NOTFOUND; |
|
|
|
|
var wrapped = this.offset.wrapped; |
|
|
|
|
this.offset.wrapped = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (found) { |
|
|
|
|
var previousPage = this.selected.pageIdx; |
|
|
|
|
this.selected.pageIdx = this.offset.pageIdx; |
|
|
|
@ -376,7 +376,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
@@ -376,7 +376,7 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|
|
|
|
this.updatePage(previousPage); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.updateUIState(state, this.state.findPrevious); |
|
|
|
|
if (this.selected.pageIdx !== -1) { |
|
|
|
|
this.updatePage(this.selected.pageIdx); |
|
|
|
@ -398,4 +398,3 @@ var PDFFindController = (function PDFFindControllerClosure() {
@@ -398,4 +398,3 @@ var PDFFindController = (function PDFFindControllerClosure() {
|
|
|
|
|
}; |
|
|
|
|
return PDFFindController; |
|
|
|
|
})(); |
|
|
|
|
|
|
|
|
|