From: Manuel Carrasco MoƱino Date: Sun, 3 Nov 2013 15:23:39 +0000 (+0100) Subject: Fix lenght check. Reflow before setting transition X-Git-Tag: release-1.4.0~35^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=987c20f78e1f5b46aafb203f219845f1d3cfe60d;p=gwtquery.git Fix lenght check. Reflow before setting transition --- 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 props = filterPropertyNames(p); String value = ""; for (String s : props) {