From 50c0c059eedc6a6cd63607ecec2e74fc198fbf88 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Thu, 14 Jul 2011 09:14:47 +0000 Subject: handle scrollLeft and scrollTop in animations. Fixes issue91 --- .../main/java/com/google/gwt/query/client/plugins/effects/Fx.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gwtquery-core') diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java index 020b7da6..e719f499 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java @@ -226,13 +226,15 @@ public class Fx { public void applyValue(GQuery g, double progress) { double ret = (start + ((end - start) * progress)); String value = ("px".equals(unit) ? ((int) ret) : ret) + unit; - - if (attribute != null) { + if ("scrollTop".equals(cssprop)) { + g.scrollTop((int)ret); + } else if ("scrollLeft".equals(cssprop)) { + g.scrollLeft((int)ret); + } else if (attribute != null) { g.attr(attribute, value); } else { g.css(cssprop, value); } - } public String toString() { -- cgit v1.2.3