]> source.dussan.org Git - gwtquery.git/commitdiff
Remove actual animation when it finishes, should fix issue_132
authorManolo Carrasco <manolo@apache.org>
Mon, 10 Sep 2012 15:27:45 +0000 (15:27 +0000)
committerManolo Carrasco <manolo@apache.org>
Mon, 10 Sep 2012 15:27:45 +0000 (15:27 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Effects.java
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/PropertiesAnimation.java

index aa163633fbcb1f6a0bad7abca9ded4364c9f158f..e3f69e99a829d6817bce78e1024f538244710b9d 100755 (executable)
@@ -36,10 +36,14 @@ public class Effects extends QueuePlugin<Effects> {
    * Class to access protected methods in Animation. \r
    */\r
   public static abstract class GQAnimation  extends Animation {\r
+    \r
+    protected Element e;\r
+    \r
     protected void onStart() {\r
       super.onStart();\r
     }\r
     protected void onComplete() {\r
+      $(e).remove(ACTUAL_ANIMATION);\r
       super.onComplete();\r
     }\r
   }\r
@@ -75,6 +79,7 @@ public class Effects extends QueuePlugin<Effects> {
         public void cancel(Element e) {\r
           Animation anim = (Animation) data(e, ACTUAL_ANIMATION, null);\r
           if (anim != null) {\r
+            remove(ACTUAL_ANIMATION);\r
             anim.cancel();\r
           }\r
         }\r
index 1e695c95ea559639a5a4d6917e3a02e4c5461d4b..52199ff6db858351ce209dcdb6ec68b73d31e835 100755 (executable)
@@ -190,7 +190,6 @@ public class PropertiesAnimation extends GQAnimation {
     return new Fx(key, val, start, end, unit, rkey);\r
   }\r
 \r
-  private Element e;\r
   private Easing easing = Easing.SWING;\r
   private JsObjectArray<Fx> effects = JsObjectArray.create();\r
   private Function[] funcs;\r