mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-15 03:21:35 +08:00
[ts][player] more clean-up.
This commit is contained in:
parent
7d039344fe
commit
3c61589312
@ -96,10 +96,10 @@
|
||||
}
|
||||
|
||||
/* Optional: callback when the widget and its assets have been successfully loaded. */
|
||||
success: (widget: SpineWidget) => void
|
||||
success: (widget: SpinePlayer) => void
|
||||
|
||||
/* Optional: callbacl when the widget could not be loaded. */
|
||||
error: (widget: SpineWidget, msg: string) => void
|
||||
/* Optional: callback when the widget could not be loaded. */
|
||||
error: (widget: SpinePlayer, msg: string) => void
|
||||
}
|
||||
|
||||
class Popup {
|
||||
@ -294,6 +294,7 @@
|
||||
let errorDom = findWithClass(this.dom, "spine-player-error")[0];
|
||||
errorDom.classList.remove("spine-player-hidden");
|
||||
errorDom.innerHTML = `<p style="text-align: center; align-self: center;">${error}</p>`;
|
||||
this.config.error(this, error);
|
||||
}
|
||||
|
||||
render(): HTMLElement {
|
||||
@ -754,6 +755,7 @@
|
||||
// Setup the input processor and controllable bones
|
||||
this.setupInput();
|
||||
|
||||
this.config.success(this);
|
||||
this.loaded = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user