|
|
|
@ -64,6 +64,8 @@ var PDFFindController = {
@@ -64,6 +64,8 @@ var PDFFindController = {
|
|
|
|
|
|
|
|
|
|
integratedFind: false, |
|
|
|
|
|
|
|
|
|
firstPagePromise: new PDFJS.Promise(), |
|
|
|
|
|
|
|
|
|
initialize: function(options) { |
|
|
|
|
if(typeof PDFFindBar === 'undefined' || PDFFindBar === null) { |
|
|
|
|
throw 'PDFFindController cannot be initialized ' + |
|
|
|
@ -172,6 +174,7 @@ var PDFFindController = {
@@ -172,6 +174,7 @@ var PDFFindController = {
|
|
|
|
|
this.state = e.detail; |
|
|
|
|
this.updateUIState(FindStates.FIND_PENDING); |
|
|
|
|
|
|
|
|
|
this.firstPagePromise.then(function() { |
|
|
|
|
this.extractText(); |
|
|
|
|
|
|
|
|
|
clearTimeout(this.findTimeout); |
|
|
|
@ -181,6 +184,7 @@ var PDFFindController = {
@@ -181,6 +184,7 @@ var PDFFindController = {
|
|
|
|
|
} else { |
|
|
|
|
this.nextMatch(); |
|
|
|
|
} |
|
|
|
|
}.bind(this)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
updatePage: function(idx) { |
|
|
|
|