View Full Version : Retreive a Component or element initial state after an animation !

17 Jan 2012, 9:01 AM
Hi all,

I am trying to add an animation on a button when I click on it. The animation Works but the button disappear after the animation.
To retrieve the intial button state, I try to set the "dynamic" property of the animation to "false", but it causes an error. On the otherhand I try to redo the layout of the parent component, and also try to save a copy of the button state to apply it after, but it's not working !

Does anyone knows what to do to not loose my "dear component" ?

Thank's in advance


17 Jan 2012, 9:04 AM
What are you doing in the handler?

18 Jan 2012, 1:42 AM
I am doing this from a controler

click: function(button, event, op){ var grid = Ext.getCmp('TContenus');
x: 0,
y: 0

duration: 1000,
easing: 'ease',
/* this part is one of the thing I tried to make it appears after the animation: try to redo the grid parent layout ! */
listeners: {
afteranimate: function(){

18 Jan 2012, 7:40 AM
Another problem I am facing now of the same type, I think, I am facing now is a collapse and expand animation on a panel, to emphase an update. To do this I use the successively the collapse and the expand method. But the result I get is toggleCollapse behavior i-e the panel just collapse when it went from an expanded state, and expand in the other case.

Is it a timing problem ?
does any animation of this already exists ?