Open GoogleCodeExporter opened 8 years ago
Original comment by luciano.broussal@gmail.com
on 6 Feb 2007 at 6:22
Original comment by luciano.broussal@gmail.com
on 21 Feb 2007 at 11:35
Original comment by laurent....@gmail.com
on 15 Mar 2007 at 10:38
Effect on closing window is plugged. Has to be improved and customizable for
all the
available actions.
Original comment by luciano.broussal@gmail.com
on 9 Apr 2007 at 4:28
Original comment by luciano.broussal@gmail.com
on 9 Apr 2007 at 4:29
Original comment by luciano.broussal@gmail.com
on 9 Apr 2007 at 4:29
Original comment by luciano.broussal@gmail.com
on 9 Apr 2007 at 7:01
Original comment by luciano.broussal@gmail.com
on 9 Apr 2007 at 7:02
Just a comment. Using the Effect stuff requires 170kb of prototype &
scriptaculous js. On MyHippocampus I
initially, used the Effect library, but I was able to reproduce all of that
animation pretty simply by just rewriting
it in GWT. Here's an example of my Move method. I'd love to see gwm not require
that extra 170kb (and also a
boolean doEffects, so I could turn the effects off). Just my 2 cents.
public class GUIEffects {
private static GUIEffects singleton = new GUIEffects();
public static void move(Widget toMove, int x, int y, int duration) {
int steps = duration/ MoveTimer.FREQ;
MoveTimer mover = singleton.new MoveTimer(toMove,x,y,steps);
mover.schedule(100);
}
private class MoveTimer extends Timer {
public static final int FREQ = 100;
private Element element;
private int curX;
private int curY;
private int curStep = 0;
private int dx;
private int dy;
private int steps;
public MoveTimer(Widget widget,int x, int y, int steps){
this.element = widget.getElement();
this.dx = x / steps;
this.dy = y / steps;
this.steps = steps;
this.curX = DOM.getIntStyleAttribute(element, "left");
this.curY = DOM.getIntStyleAttribute(element, "top");
}
public void run() {
DOM.setIntStyleAttribute(element, "left", curX);
DOM.setIntStyleAttribute(element, "top", curY);
curX += dx;
curY += dy;
curStep++;
if(curStep > steps){
cancel();
}else{
schedule(FREQ);
}
}
}
Original comment by jdw...@gmail.com
on 12 Jun 2007 at 2:00
Original issue reported on code.google.com by
luciano.broussal@gmail.com
on 19 Dec 2006 at 4:59