how to add MGWT Animation within some widget instead of RootPanel

103 views Asked by At

I am doing animation in mgwt, but the problem is when I animate some widget . that widget comes at the top level (RootPanel) over all the widgets.

code:

        VerticalPanel vpnlMain = new VerticalPanel();
        vpnlMain.add(widget1);
        vpnlMain.add(animationHelper);
        animationHelper.goTo(widget2, Animations.SLIDE);

    previousImageButton.addTapHandler(new TapHandler() {

        @Override
        public void onTap(TapEvent event) {
            animationHelper.goTo(vpnlMain, Animations.SLIDE_REVERSE);
        }
    });

Everything works, Widget animates, but it comes over all of the other widgets, at the root level. Even my headers got disappeared.

Whereas I am expecting the animated widget to come inside vpnlMain.

1

There are 1 answers

0
Pero On

Did you try?

animationHelper.goTo(widget1, Animations.SLIDE_REVERSE);