mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-21 23:58:07 +02:00
Ensure that the loadingBar isn't displayed again when the entire file has already been fetched
This could only (potentially) happen when `disableAutoFetch` is used.
This commit is contained in:
parent
783d42ec2b
commit
fce31c3f83
1 changed files with 5 additions and 0 deletions
|
@ -846,6 +846,11 @@ let PDFViewerApplication = {
|
|||
},
|
||||
|
||||
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);
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue