mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
fix loading animation bug
This commit is contained in:
@@ -465,11 +465,10 @@
|
||||
* Render progress bar
|
||||
*/
|
||||
function progressbar (ref) {
|
||||
barE2.style.display = "block";
|
||||
|
||||
var loaded = ref.loaded;
|
||||
var total = ref.total;
|
||||
var step = ref.step;
|
||||
|
||||
var num;
|
||||
|
||||
!barEl && init();
|
||||
@@ -480,7 +479,7 @@
|
||||
} else {
|
||||
num = Math.floor(loaded / total * 100);
|
||||
}
|
||||
|
||||
barE2.style.display = "block";
|
||||
barEl.style.opacity = 1;
|
||||
barEl.style.width = num >= 95 ? '100%' : num + '%';
|
||||
if (num == Infinity) {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user