diff options
author | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-11-03 16:23:39 +0100 |
---|---|---|
committer | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-11-03 16:23:39 +0100 |
commit | 987c20f78e1f5b46aafb203f219845f1d3cfe60d (patch) | |
tree | 7e99599d0cb5e8af2fee3233ff94a78318847ee4 | |
parent | 969e8879f8a8489f301d4050a6c02ec46afa296c (diff) | |
download | gwtquery-987c20f78e1f5b46aafb203f219845f1d3cfe60d.tar.gz gwtquery-987c20f78e1f5b46aafb203f219845f1d3cfe60d.zip |
Fix lenght check. Reflow before setting transition
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java index ec027133..21324b1a 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java @@ -82,7 +82,7 @@ public class Transitions extends GQuery { } public void setFromString(String prop, String ...val) { - if (val.length == 0 && val[0] instanceof String) { + if (val.length == 1 && val[0] instanceof String) { String[] vals = ((String)val[0]).split("[\\s*,\\s*]"); set(prop, vals); } else { @@ -276,9 +276,11 @@ public class Transitions extends GQuery { if (easing == null) { easing = EasingCurve.ease; } + + // Force reflow before setting transitions, so as we do not animate previous values + css("offsetHeight"); String attribs = duration + "ms" + " " + easing.toString() + " " + delay + "ms"; - List<String> props = filterPropertyNames(p); String value = ""; for (String s : props) { |