Browse Source

Merge pull request #8718 from Snuffleupagus/loadingBar-downloadComplete-check

Ensure that the loadingBar isn't displayed again when the entire file has already been fetched
Tim van der Meij 8 years ago committed by GitHub
parent
commit
2702021a84
  1. 5
      web/app.js

5
web/app.js

@ -846,6 +846,11 @@ let PDFViewerApplication = {
}, },
progress(level) { progress(level) {
if (this.downloadComplete) {
// Don't accidentally show the loading bar again when the entire file has
// already been fetched (only an issue when disableAutoFetch is enabled).
return;
}
let percent = Math.round(level * 100); let percent = Math.round(level * 100);
// When we transition from full request to range requests, it's possible // When we transition from full request to range requests, it's possible
// that we discard some of the loaded data. This can cause the loading // that we discard some of the loaded data. This can cause the loading

Loading…
Cancel
Save