From 67b0de39097df88437d0ddc484eae4d7f0a45dd0 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 10 Sep 2012 15:27:45 +0000 Subject: [PATCH] Remove actual animation when it finishes, should fix issue_132 --- .../java/com/google/gwt/query/client/plugins/Effects.java | 5 +++++ .../query/client/plugins/effects/PropertiesAnimation.java | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) 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 { * 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 { 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 effects = JsObjectArray.create(); private Function[] funcs; -- 2.39.5