root 4 years ago
parent
commit
aedb133a2c
1 changed files with 7 additions and 5 deletions
  1. 7 5
      src/blockly/cocoblockly.js

+ 7 - 5
src/blockly/cocoblockly.js

@@ -604,11 +604,13 @@ function progress_text(msg, percent) {
         $(".determinate")[0].className = "determinate green gray" :
         $(".determinate")[0].className = "determinate green";
 
-
-    $('.progress > .determinate').css('width', percent);
-
+    if (percent == "0%") {
+        $('.progress > .determinate').css('transition', "none");
+        $('.progress > .determinate').css('width', percent);
+    }
+    $('.progress > .determinate').css('transition', "width .3s linear");
     msg == CCB.str_group.upload_fail ?
-        $(".determinate").css("width","100%") :
+        $(".determinate").css("width", "100%") :
         '';
 
     disableCompileUploadBtn();
@@ -1709,7 +1711,7 @@ async function cocoblockly() {
     add_tooltips(tooltips);
     ws_connect();
 
-    getlxfiles(0,getFileList);
+    getlxfiles(0, getFileList);
 };