1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Raleigh, NC
    Posts
    374
    Answers
    18
    Vote Rating
    121
    brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all

      0  

    Default Unanswered: Execute code after effect complete?

    Unanswered: Execute code after effect complete?


    Hi, I'm using a simple slide out on an element:

    getElement().<FxElement>cast().slideOut( Style.Direction.UP );

    I need something to happen AFTER the effect is finished (I want to remove the element and do some cleanup). However, I can't find any way to add code or attach an event handler that will run when the slide out is done. Am I missing something?

    Thanks,

    Brian

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,640
    Answers
    107
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    If you are using the default animation, you could set a timer at the default time, 250ms, to know that animation had finished. However, the animation methods on FxElement are each overridden to accept an Fx instance, which provides the ability to listen to the animation being canceled or ending, as well as to cancel the animation outright.

    Instead of the one line:

    Code:
    getElement().<FxElement>cast().slideOut( Style.Direction.UP );
    Create an Fx instance first, configure it, and pass it in:

    Code:
    Fx fx = new Fx();
    fx.addAfterAnimateHandler(new AfterAnimateHandler(){
      public void onAfterAnimate(AfterAnimateEvent event) {
        //handle after animation...
      }
    });
    getElement().<FxElement>cast().slideOut(Style.Direction.UP, fx);

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Raleigh, NC
    Posts
    374
    Answers
    18
    Vote Rating
    121
    brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all brian428 is a name known to all

      0  

    Default


    Thank you very much, that's exactly what I was looking for! Works perfectly.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar