PDA

View Full Version : [FIXED] BUG? Animated components, dont display on readd



craigday
26 Jun 2008, 6:59 AM
Components that are animated, removed, and then re-added do not display:

private ContentPanel testPanel;

public final void onModuleLoad() {
testPanel = new ContentPanel();
testPanel.setSize(300, 200);
testPanel.setHeading("test");

RootPanel.get().add(testPanel);

FxConfig config = new FxConfig();
config.setEffectCompleteListener(new Listener<FxEvent>() {
public void handleEvent(FxEvent be) {
RootPanel.get().remove(testPanel);
RootPanel.get().add(testPanel);
testPanel.setVisible(true);
}
});
testPanel.el().fadeOut(config);
}

craigday
26 Jun 2008, 7:12 AM
Following change seems to fix it, but should not be necessary:

private ContentPanel testPanel;

public final void onModuleLoad() {
testPanel = new ContentPanel();
testPanel.setSize(300, 200);
testPanel.setHeading("test");

RootPanel.get().add(testPanel);

FxConfig config = new FxConfig();
config.setEffectCompleteListener(new Listener<FxEvent>() {
public void handleEvent(FxEvent be) {
RootPanel.get().remove(testPanel);
RootPanel.get().add(testPanel);
testPanel.el().setStyleAttribute("filter", "");
testPanel.el().setVisible(true);
}
});
testPanel.el().fadeOut(config);
}

darrellmeyer
26 Jun 2008, 2:10 PM
Fix is in SVN.