PDA

View Full Version : Ext.Element.fadeOut / In animation issue



kkris1983
11 May 2012, 8:34 AM
Hi,

I am working on fadeOut/In animation with Panel:


var el = panel.getEl();
var me = this;
el.fadeOut({
easing: 'easeOut',
duration: 150,
callback: function(){ //1st callback
panel.alignTo([differentElement]);
el.fadeIn({
easing: 'easeIn',
duration: 150,
callback: function(){ //2nd callback
THIS IS NEVER INVOKED
}
}
}


second callback is never invoked! I found workaround so in 1st callback function I defer call like so:


Ext.defer(function(){
panel.alignTo([differentElement]);
el.fadeIn({
easing: 'easeIn',
duration: 150,
callback: function(){ //2nd callback
IT WORKS
}
}
}, 1, me);


Can someone explain me why in first case callback is not called ?

Best regards kkris1983