But I'm having a problem with having a div wipe off the screen after
having wiped it on. when I try, the element blinks before wiping off,
and I'd prefer that it not. Is there a better way to do this?
#effectPanel {
background:black;
}
#wipe {
background:white;
border:1px solid black;
width:100%;
height:200px;
position:fixed;
top:0px;
}
import org.adamtacy.client.ui.effects.impl.WipeDown;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
public class EffectTest extends VerticalPanel {
Label panel = new Label("this is a panel");
public EffectTest(){
getElement().setId("effectPanel");
this.setHeight("100%");
this.setWidth("100%");
panel.getElement().setId("wipe");
panel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
WipeDown wipe = new WipeDown(panel.getElement());
wipe.play(1,0);
}
});
WipeDown wipe = new WipeDown(panel.getElement());
this.add(panel);
wipe.play();
}
}
The blinking comes as the effect initialises itself - I have to admit,
I've not yet found a way to stop it doing that. (I was going to
suggest using a WipeDown for your first effect and then a BlindUp to
remove the object, but just testing quickly, the BlindUp also blinks).
There must be a solution to it, but unfortunately I haven't the time
to look just right now - if you raise an issue in the issue log, then
at least it will get tracked (or you could try building the effect
yourself using a NMorphClip object - WipeDown just extends ClipBase,
which extends NMorphClip, somewhere in that chain is the blink)
//Adam