I'm trying to execute a chain of animations using the ExtJS 6.6 Modern Toolkit. Specifically, I want to fade in an element, fade it out again after a delay, and then remove it from the DOM. I was trying to accomplish this with the following:
The problem is that BOTH "after" handlers are executed after the first animation, removing the element before the second animation even starts, let alone finishes. The following fiddle demonstrates the issue: https://fiddle.sencha.com/#view/editor&fiddle/2moaCode:Ext.Anim.run(msgEl, 'fade', { out: false, after: () => { console.log('after fade in'); Ext.Anim.run(msgEl, 'fade', { out: true, delay: 1500, after: () => { console.log('after fade out'); msgEl.remove(); } }); } });
Note that both console logs are output at the completion of the first animation. The durations used in the fiddle are deliberately extended to make it more obvious.
Is this a bug, or am I completely off-base with how to achieve this effect using ExtJS animations?