File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ var ProgressBar = (function ProgressBarClosure() {
110
110
111
111
// Initialize heights
112
112
this .div .style .height = this .height + this .units ;
113
+ this .percent = 0 ;
113
114
}
114
115
115
116
ProgressBar .prototype = {
@@ -1333,7 +1334,13 @@ var PDFView = {
1333
1334
1334
1335
progress : function pdfViewProgress (level ) {
1335
1336
var percent = Math .round (level * 100 );
1336
- PDFView .loadingBar .percent = percent ;
1337
+ // When we transition from full request to range requests, it's possible
1338
+ // that we discard some of the loaded data. This can cause the loading
1339
+ // bar to move backwards. So prevent this by only updating the bar if it
1340
+ // increases.
1341
+ if (percent > PDFView .loadingBar .percent ) {
1342
+ PDFView .loadingBar .percent = percent ;
1343
+ }
1337
1344
},
1338
1345
1339
1346
load : function pdfViewLoad (pdfDocument , scale ) {
You can’t perform that action at this time.
0 commit comments