Browse Source

Add a `reset` method to `PDFFindbar`, and use it to clear parts of the find UI when the document is closed

Jonas Jenwald 9 years ago
parent
commit
c7a44391cf
  1. 4
      web/pdf_find_bar.js
  2. 1
      web/viewer.js

4
web/pdf_find_bar.js

@ -83,6 +83,10 @@ var PDFFindBar = (function PDFFindBarClosure() {
} }
PDFFindBar.prototype = { PDFFindBar.prototype = {
reset: function PDFFindBar_reset() {
this.updateUIState();
},
dispatchEvent: function PDFFindBar_dispatchEvent(type, findPrev) { dispatchEvent: function PDFFindBar_dispatchEvent(type, findPrev) {
var event = document.createEvent('CustomEvent'); var event = document.createEvent('CustomEvent');
event.initCustomEvent('find' + type, true, true, { event.initCustomEvent('find' + type, true, true, {

1
web/viewer.js

@ -527,6 +527,7 @@ var PDFViewerApplication = {
} }
this.findController.reset(); this.findController.reset();
this.findBar.reset();
if (typeof PDFBug !== 'undefined') { if (typeof PDFBug !== 'undefined') {
PDFBug.cleanup(); PDFBug.cleanup();

Loading…
Cancel
Save