瀏覽代碼

Playground v4.1.2 fix compileAndRun call.

DEV-UNITY-6\Utilisateur 6 年之前
父節點
當前提交
4c405ccc5d
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 4 0
      Playground/js/main.js
  2. 1 1
      Playground/js/settingsPG.js

+ 4 - 0
Playground/js/main.js

@@ -631,6 +631,10 @@ class Main {
         this.parent.monacoCreator.JsEditor.focus();
     };
 
+    compileAndRunFromOutside() {
+        compileAndRun(this.parent, this.fpsLabel);
+    };
+
     checkSafeMode(message) {
         if (document.getElementById("safemodeToggle" + this.parent.utils.getCurrentSize()) &&
             document.getElementById("safemodeToggle" + this.parent.utils.getCurrentSize()).classList.contains('checked')) {

+ 1 - 1
Playground/js/settingsPG.js

@@ -163,7 +163,7 @@ class SettingsPG {
                 localStorage.removeItem("bjs-playground-apiversion");
                 localStorage.removeItem("bjs-playground-apiversion-tempcode");
 
-                this.parent.main.compileAndRun();
+                this.parent.main.compileAndRunFromOutside();
             }.bind(this);
 
             document.head.appendChild(newBJSscript);