1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Raleigh, NC
    Posts
    418
    Answers
    23
    Vote Rating
    136
    brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold

      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,731
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      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
    418
    Answers
    23
    Vote Rating
    136
    brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold brian428 is a splendid one to behold

      0  

    Default


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

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi