浏览代码

[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;
             this.cancelId = 0;
             if (typeof parent === "string")
             if (typeof parent === "string")
                 this.parent = document.getElementById(parent);
                 this.parent = document.getElementById(parent);
+            else
+                this.parent = parent;
             this.parent.appendChild(this.render());
             this.parent.appendChild(this.render());
         }
         }
         SpinePlayer.prototype.validateConfig = function (config) {
         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) {
 		constructor(parent: HTMLElement | string, private config: SpinePlayerConfig) {
 			if (typeof parent === "string") this.parent = document.getElementById(parent);
 			if (typeof parent === "string") this.parent = document.getElementById(parent);
+			else this.parent = parent;
 			this.parent.appendChild(this.render());
 			this.parent.appendChild(this.render());
 		}
 		}
 
 

部分文件因为文件数量过多而无法显示