I'm seeing in several applications an 'after' config option for Ext.Anim that allows one to define a callback to fire once the animation is complete. This is not mentioned in the Sencha Touch API, and the Sencha 4 API has a different config option called 'callback'. When I look at the Sencha Touch source, it appears to reference an after config option:
Code:
run:function(el, config){
el =Ext.get(el);
config = config ||{};
var me =this,
style = el.dom.style,
property,
after = config.after;
if(me.running[el.id]){
me.onTransitionEnd(null, el,{
config: config,
after: after
});
}
But including this as a config doesn't seem to do anything:
Code:
new Ext.Anim({
from: {'opacity': 1},
to: {'opacity': 0},
duration: 500,
after: function () {
console.log('after');
}
}).run(item.target);
This will run the animation, but will not run the 'after' function. What is the appropriate way to define a callback for Ext.Anim?