Forráskód Böngészése

Merge pull request #689 from vousk/patch-screenshotDate

Change screenshot file naming format
Temechon 10 éve
szülő
commit
bf174a5963
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/Tools/babylon.tools.ts

+ 2 - 2
src/Tools/babylon.tools.ts

@@ -505,8 +505,8 @@
                 var a = window.document.createElement("a");
                 a.href = base64Image;
                 var date = new Date();
-                var stringDate = date.getFullYear() + "/" + date.getMonth() + "/" + date.getDate() + "-" + date.getHours() + ":" + date.getMinutes();
-                a.setAttribute("download", "screenshot-" + stringDate + ".png");
+                var stringDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + "_" + date.getHours() + "-" + ('0'+date.getMinutes()).slice(-2);
+                a.setAttribute("download", "screenshot_" + stringDate + ".png");
 
                 window.document.body.appendChild(a);