Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    AnimationEffect - Slide from bottom to top

    Hi all,

    I'm doing a custom VLayout, and I would like to use an AnimationEffect to show this component.

    I want to use the SLIDE animationEffect, but I would like to have an animation starting from bottom going to top (and not from top to bottom).

    Can I achieve this without doing my own custom animation ?

    For an exemple, see this : http://www.smartclient.com/smartgwt/showcase/#effects_animation_slide

    Using SmartGWT 2.4

    Cheers.

    #2
    In the SmartClient API you can pass an Object like { effort:"slide", startFrom:"top" } (see SmartClient docs for this). This is not yet wrapped for SmartGWT (will be in 3.0) but you could make a JSNI call rather than writing your own animation.

    Comment


      #3
      Hi Isomorphic,

      First of all, thank you for your reply. I was reading the documentation you sent to me, and I see :

      "For show animations of type "wipe" and "slide" this attribute specifies where the wipe / slide should originate. Valid values are "T" (vertical animation from the top down, the default behavior), and "L" (horizontal animation from the left side)."

      After that, I took a deeply look on this forum, and I've not found any documentation or example on wrapping SmartClient API.

      Can you provide some URL or fast help ?

      Thanks a lot

      Comment


        #4
        You don't need to wrap the SmartClient API, you just need to call it. Use a JSNI block, getJSObj() on the target widget to obtain the SmartClient object, and use the SmartClient docs to call the API.

        If you are uncomfortable with any of these steps, you should wait for the API to be wrapped in a future version instead.

        Comment


          #5
          Can you give a sample snippet for the JSNI method in order to start with...

          Comment


            #6
            I tried without success, and also found nothing in the forums. Wait for Isomorphic answer if you get one.

            Good Luck

            Comment


              #7
              Can anyone tell me the solution for changing the slide effect from bottom to top

              Comment


                #8
                Maybe this will help:
                Code:
                public native void animateShow(Canvas canvas, AnimationEffect effect, String endsAt, String startFrom) /*-{
                    var effectJsObj = { 
                        effect:     effect.@com.smartgwt.client.types.AnimationEffect::getValue()(),
                        endsAt:     endsAt,
                        startFrom:  startFrom};
                    var canvasJsObj = canvas.@com.smartgwt.client.widgets.Canvas::getOrCreateJsObj()();
                    canvasJsObj.animateShow(effectJsObj);
                }-*/;
                I tried passed "B" for startFrom and it didn't work but "T" did for both endsAt and startFrom

                Comment


                  #9
                  Hi,

                  Has this been wrapped/included in 3.0?

                  Thanks

                  Comment


                    #10
                    Originally posted by martincho
                    Hi,

                    Has this been wrapped/included in 3.0?

                    Thanks
                    Same question.

                    Comment


                      #11
                      As the question still answered, I will assume it isn't bundled in 3.0.

                      I would also say that this doesn't exist in SmartClient.

                      http://www.smartclient.com/docs/8.0/a/b/c/go.html#attr..animationShowEffect.startFrom

                      Best Regards.

                      Comment


                        #12
                        I need to use anumate slide from right to left. Is it possible in smart gwt now?

                        Comment


                          #13
                          This has not yet been wrapped, but can be used with kevboy's approach in post #8.

                          Comment


                            #14
                            Thanks for the solution for sliding from right to left and vice-cersa for showing.

                            I included the mentioned native method and called it passing the arguments: as

                            animateShow(myCanvas,AnimationEffect.SLIDE, "T", "B");

                            And similarly for hide.

                            animateHide(myCanvas,AnimationEffect.SLIDE, "T", "B");

                            But i didnot understand what does initials T and B means. Can you please explain how that is working even though i want it to work from right to left and not top to bottom(which is default).

                            Comment


                              #15
                              "T" is top and "B" is bottom, as explained in the docs.

                              Comment

                              Working...
                              X