Merge pull request #4617 from yurydelendik/documentload
Changes 'documentload' event behavior.
This commit is contained in:
commit
358d038e8d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user