[ts][player] Fixed constructor.

This commit is contained in:
badlogic 2018-12-17 18:43:42 +01:00
parent d1172cc785
commit ba33942a45
3 changed files with 4 additions and 1 deletions

View File

@ -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) {

File diff suppressed because one or more lines are too long

View File

@ -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());
}