瀏覽代碼

[ts][player] Fixed constructor.

badlogic 6 年之前
父節點
當前提交
ba33942a45
共有 3 個文件被更改,包括 3 次插入0 次删除
  1. 2 0
      spine-ts/build/spine-player.js
  2. 0 0
      spine-ts/build/spine-player.js.map
  3. 1 0
      spine-ts/player/src/Player.ts

+ 2 - 0
spine-ts/build/spine-player.js

@@ -9574,6 +9574,8 @@ var spine;
             this.cancelId = 0;
             if (typeof parent === "string")
                 this.parent = document.getElementById(parent);
+            else
+                this.parent = parent;
             this.parent.appendChild(this.render());
         }
         SpinePlayer.prototype.validateConfig = function (config) {

文件差異過大導致無法顯示
+ 0 - 0
spine-ts/build/spine-player.js.map


+ 1 - 0
spine-ts/player/src/Player.ts

@@ -314,6 +314,7 @@
 
 		constructor(parent: HTMLElement | string, private config: SpinePlayerConfig) {
 			if (typeof parent === "string") this.parent = document.getElementById(parent);
+			else this.parent = parent;
 			this.parent.appendChild(this.render());
 		}
 

部分文件因文件數量過多而無法顯示