aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2011-07-14 09:14:47 +0000
committerManolo Carrasco <manolo@apache.org>2011-07-14 09:14:47 +0000
commit50c0c059eedc6a6cd63607ecec2e74fc198fbf88 (patch)
treefe8e9b8df2b7130f08e36739f894a640588c2666 /gwtquery-core
parent15c3be18998c59dac69dcfed9a43cc7657b8a6ac (diff)
downloadgwtquery-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.java8
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() {