From 3c615893123c275b4b51278710344d0f81e11a07 Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 8 Nov 2018 17:44:12 +0100 Subject: [PATCH] [ts][player] more clean-up. --- spine-ts/widget/src/Player.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spine-ts/widget/src/Player.ts b/spine-ts/widget/src/Player.ts index 6a671d8f7..c65298729 100644 --- a/spine-ts/widget/src/Player.ts +++ b/spine-ts/widget/src/Player.ts @@ -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 = `

${error}

`; + 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; }