// Each Animation is associated to one element
protected Element e;
-
+ protected Properties prps;
+
+ protected GQAnimation setElement(Element element) {
+ e = element;
+ return this;
+ }
+ protected GQAnimation setProperties(Properties properties) {
+ prps = properties;
+ return this;
+ }
protected void onStart() {
// Mark this animation as actual, so as we can stop it in the GQuery.stop() method
$(e).data(ACTUAL_ANIMATION, this);
private Corner corner;
private Direction direction;
private GQuery back = Effects.$();
- private Function[] funcs;
private Effects g;
private Action currentAction;
this(elem, a, c, d, null, Properties.create(), funcs);
}
- @Override
- public void onCancel() {
- Boolean jumpToEnd = Effects.$(e).data(Effects.JUMP_TO_END, Boolean.class);
- if (jumpToEnd != null && jumpToEnd){
- onComplete();
- } else {
- g.dequeue();
- }
- }
-
@Override
public void onComplete() {
super.onComplete();
back.remove();
back = Effects.$();
g.css("clip", "");
- g.each(funcs);
- g.dequeue();
}
@Override
protected Easing easing;
protected JsObjectArray<Fx> effects;
protected Function[] funcs;
- protected Properties prps;
private Effects g;
public PropertiesAnimation(Element elem, Properties p, Function... funcs) {
}
}
this.easing = easing;
- this.e = elem;
this.funcs = funcs;
- this.prps = p;
+ setProperties(p);
+ setElement(elem);
+
g = $(e).as(Effects.Effects);
}
import com.google.gwt.query.client.Properties;
import com.google.gwt.query.client.js.JsObjectArray;
import com.google.gwt.query.client.plugins.effects.Fx.TransitFx;
-import com.google.gwt.query.client.plugins.effects.PropertiesAnimation.EasingCurve;
import com.google.gwt.regexp.shared.MatchResult;
/**