瀏覽代碼

mandatory commit

jbousquie 10 年之前
父節點
當前提交
9905104949
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Tools/babylon.tools.js

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

@@ -421,8 +421,8 @@ var BABYLON;
                 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);
                 a.addEventListener("click", function () {
                     a.parentElement.removeChild(a);