Merge pull request #4617 from yurydelendik/documentload

Changes 'documentload' event behavior.
This commit is contained in:
Yury Delendik 2014-04-14 06:44:29 -05:00
commit 358d038e8d

View File

@ -913,7 +913,7 @@ var PDFView = {
DocumentProperties.resolveDataAvailable();
pdfDocument.getDownloadInfo().then(function() {
var downloadedPromise = pdfDocument.getDownloadInfo().then(function() {
self.downloadComplete = true;
PDFView.loadingBar.hide();
var outerContainer = document.getElementById('outerContainer');
@ -988,9 +988,11 @@ var PDFView = {
}
});
var event = document.createEvent('CustomEvent');
event.initCustomEvent('documentload', true, true, {});
window.dispatchEvent(event);
downloadedPromise.then(function () {
var event = document.createEvent('CustomEvent');
event.initCustomEvent('documentload', true, true, {});
window.dispatchEvent(event);
});
PDFView.loadingBar.setWidth(container);