Announcement

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

    Animation effect problem

    I'm developing a mobile application with Smart GWT.
    Everything works, but I would like to be able to use the "animateShow(AnimationEffect effect)" method with the SLIDE effect from right to left (instead of from left to right).

    I tried with the implementation of the native method:

    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);
    }-*/;
    by passing (MyCanvas, AnimationEffect.SLIDE, "R", "L") as parameters in my class, but it doesn't work.

    What am I doing wrong?

    Thanks in advantage.

    #2
    animateShow() (for wipe / slide type animations) currently only supports showing either top to bottom or left to right. You can specify which you want via the 'startFrom' attribute of the AnimationEffect object - supported values are "L" [the default] and "T".
    FYI the endsAt attribute is used for animateHide() only, and similar support "L" and "T" only).

    So there's nothing wrong with your JSNI - the feature to show from Right to Left just isn't present yet.

    We will be adding this feature in the future but it's not at the top of our priority stack currently.
    For now you can use animateRect() to get the same effect.

    Comment

    Working...
    X