mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Stop using downloadComplete
in PDFViewerApplication.progress
This was only necessary to prevent (unlikely) visual glitches when `disableAutoFetch = true` is being used.
However, it turns out that we can move this functionality into the `ProgressBar` class instead by checking if the entire PDF document has loaded. This works since the API is always reporting 100% loading progress regardless of how the document was loaded; see [this code](ed83d7c5e1/src/display/api.js (L2735-L2740)
).
This commit is contained in:
parent
ed83d7c5e1
commit
006242489d
2 changed files with 2 additions and 7 deletions
|
@ -740,7 +740,7 @@ class ProgressBar {
|
|||
}
|
||||
|
||||
setDisableAutoFetch(delay = /* ms = */ 5000) {
|
||||
if (isNaN(this.#percent)) {
|
||||
if (this.#percent === 100 || isNaN(this.#percent)) {
|
||||
return;
|
||||
}
|
||||
if (this.#disableAutoFetchTimeout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue