PDA

View Full Version : event slideout animation



tdikarim
28 Nov 2012, 4:47 AM
Hi All,

How to detect a slideOut animation is finished ?



Ext.get("MENUNAV_cmd").slideOut('r', {
easing: 'easeOut',
duration: slideDuration,
remove: false,
useDisplay: false
});

//I want to apply this only when the slideOut animation is finished
Ext.get("MENUNAV_img_nouvelle_commande").dom.outerHTML = '<img id="MENUNAV_img_cmd" src="imag

es/MenuNavigation/cmd_up_fr.png">';
Ext.get("MENUNAV_cmd").slideIn('l', {
easing: 'easeIn',
duration: slideDuration
});


Thanks for your help

slemmon
28 Nov 2012, 10:42 AM
I'd use the callback param on the animation:



Ext.get("MENUNAV_cmd").slideOut('r', {
easing: 'easeOut',
duration: slideDuration,
remove: false,
useDisplay: false,
callback: function () {
// do something after the slideout animation is complete ...
}
});

tdikarim
29 Nov 2012, 2:03 AM
Thanks
that's work like a charm