mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-03 14:19:09 +08:00
[ts][player] Fixed constructor.
This commit is contained in:
parent
d1172cc785
commit
ba33942a45
@ -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) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user