1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    33
    Answers
    1
    Vote Rating
    0
    near is on a distinguished road

      0  

    Question Unanswered: Retreive a Component or element initial state after an animation !

    Unanswered: Retreive a Component or element initial state after an animation !


    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

    Near

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What are you doing in the handler?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    33
    Answers
    1
    Vote Rating
    0
    near is on a distinguished road

      0  

    Default


    I am doing this from a controler
    Code:
    click: function(button, event, op){					var grid = Ext.getCmp('TContenus');
    					button.animate(
    						{
    							to:{
    								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(){
    									grid.doLayout();
    								}
    							}
    						}
    					);
    				}

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    33
    Answers
    1
    Vote Rating
    0
    near is on a distinguished road

      0  

    Default


    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 ?

    regards

    near

Thread Participants: 1