aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2012-09-10 15:27:45 +0000
committerManolo Carrasco <manolo@apache.org>2012-09-10 15:27:45 +0000
commit67b0de39097df88437d0ddc484eae4d7f0a45dd0 (patch)
tree09d5ffb5253e6f7c0e6ae0cbc4055de042e8034a
parent2b79b024b4f46d427b8d1adbdce36bdd8ca412a7 (diff)
downloadgwtquery-67b0de39097df88437d0ddc484eae4d7f0a45dd0.tar.gz
gwtquery-67b0de39097df88437d0ddc484eae4d7f0a45dd0.zip
Remove actual animation when it finishes, should fix issue_132
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java5
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java1
2 files changed, 5 insertions, 1 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
index aa163633..e3f69e99 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
@@ -36,10 +36,14 @@ public class Effects extends QueuePlugin<Effects> {
* Class to access protected methods in Animation.
*/
public static abstract class GQAnimation extends Animation {
+
+ protected Element e;
+
protected void onStart() {
super.onStart();
}
protected void onComplete() {
+ $(e).remove(ACTUAL_ANIMATION);
super.onComplete();
}
}
@@ -75,6 +79,7 @@ public class Effects extends QueuePlugin<Effects> {
public void cancel(Element e) {
Animation anim = (Animation) data(e, ACTUAL_ANIMATION, null);
if (anim != null) {
+ remove(ACTUAL_ANIMATION);
anim.cancel();
}
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
index 1e695c95..52199ff6 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java
@@ -190,7 +190,6 @@ public class PropertiesAnimation extends GQAnimation {
return new Fx(key, val, start, end, unit, rkey);
}
- private Element e;
private Easing easing = Easing.SWING;
private JsObjectArray<Fx> effects = JsObjectArray.create();
private Function[] funcs;