diff options
author | Manolo Carrasco <manolo@apache.org> | 2011-07-14 09:14:47 +0000 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2011-07-14 09:14:47 +0000 |
commit | 50c0c059eedc6a6cd63607ecec2e74fc198fbf88 (patch) | |
tree | fe8e9b8df2b7130f08e36739f894a640588c2666 /gwtquery-core | |
parent | 15c3be18998c59dac69dcfed9a43cc7657b8a6ac (diff) | |
download | gwtquery-50c0c059eedc6a6cd63607ecec2e74fc198fbf88.tar.gz gwtquery-50c0c059eedc6a6cd63607ecec2e74fc198fbf88.zip |
handle scrollLeft and scrollTop in animations. Fixes issue91
Diffstat (limited to 'gwtquery-core')
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java | 8 |
1 files changed, 5 insertions, 3 deletions
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() { |