From 4ea3adcff3ea5afa6df6a283fba95bc4bef19e24 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 19 Jul 2019 19:10:44 +1000 Subject: [PATCH] comments --- client/src/events.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/events.jsx b/client/src/events.jsx index 0c883262..0b1b4fcd 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -67,6 +67,7 @@ function registerEvents(store) { if (sequence.includes('START_SKILL')) store.dispatch(actions.setAnimSource(anims.animSource)); if (sequence.includes('END_SKILL')) store.dispatch(actions.setAnimTarget(anims.animTarget)); if (sequence.includes('POST_SKILL')) { + // timeout to prevent text classes from being added too soon setTimeout( () => store.dispatch(actions.setAnimText(text)), timeout - 1000, @@ -79,6 +80,7 @@ function registerEvents(store) { store.dispatch(actions.setAnimText(null)); return setTimeout(cb, 50); }, timeout); + }, err => { if (err) return console.error(err); // clear animation state