aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-11-09 16:12:19 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-11-09 16:12:19 +0100
commit4d172c6f178fee109476234c99e24aa0f60871ba (patch)
tree37507260b6695071a0d22568c4d4564888d9046f
parent00a9035774e41fcc38ae42af363e64c9777f6ba6 (diff)
downloadgwtquery-4d172c6f178fee109476234c99e24aa0f60871ba.tar.gz
gwtquery-4d172c6f178fee109476234c99e24aa0f60871ba.zip
Some styling corrections, println and javadoc
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/ClipAnimation.java8
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Fx.java2
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java1
-rwxr-xr-xgwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java21
4 files changed, 16 insertions, 16 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/ClipAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/ClipAnimation.java
index b38e4747..a694e509 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/ClipAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/ClipAnimation.java
@@ -131,8 +131,12 @@ public class ClipAnimation extends PropertiesAnimation {
if (action == Action.HIDE) {
progress = (1 - progress);
}
- int w = g.outerWidth(), h = g.outerHeight();
- int top = 0, left = 0, right = w, bottom = h;
+ int w = g.outerWidth();
+ int h = g.outerHeight();
+ int top = 0;
+ int left = 0;
+ int right = w;
+ int bottom = h;
if (direction == Direction.VERTICAL || direction == Direction.BIDIRECTIONAL) {
bottom = (int) (h * progress);
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 426c408d..a2a374b8 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
@@ -19,7 +19,7 @@ public class Fx {
public static boolean off = false;
/**
- * A pojo to store color transition values.
+ * A pojo to store css3 transition values.
*/
public static class TransitFx extends Fx {
public String transitEnd;
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 9a290753..4d195e21 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
@@ -345,5 +345,4 @@ public class Transitions extends GQuery {
public Transitions transition(Object stringOrProperties, int duration, String easing, int delay) {
return transition(stringOrProperties, duration, EasingCurve.valueOf(easing), delay);
}
-
}
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
index 3d0479ea..d15f19ec 100755
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java
@@ -37,7 +37,7 @@ public class TransitionsAnimation extends PropertiesAnimation {
val = hidden ? "show" : "hide";
}
- if (("show".equals(val) && !hidden) || ("hide").equals(val) && hidden) {
+ if ("show".equals(val) && !hidden || "hide".equals(val) && hidden) {
return null;
}
@@ -62,13 +62,13 @@ public class TransitionsAnimation extends PropertiesAnimation {
if (parts != null) {
unit = REGEX_NON_PIXEL_ATTRS.test(key) || Transitions.transformRegex.test(key) ? "" : "px";
- String $1 = parts.getGroup(1);
- String $2 = parts.getGroup(2);
- String $3 = parts.getGroup(3);
- trsEnd = "" + Double.parseDouble($2);
+ String part1 = parts.getGroup(1);
+ String part2 = parts.getGroup(2);
+ String part3 = parts.getGroup(3);
+ trsEnd = "" + Double.parseDouble(part2);
- if (unit.isEmpty() && $3 != null) {
- unit = $3;
+ if (unit.isEmpty() && part3 != null) {
+ unit = part3;
}
if (trsStart.isEmpty()) {
trsStart = "0";
@@ -78,8 +78,8 @@ public class TransitionsAnimation extends PropertiesAnimation {
trsStart += unit;
}
- if ($1 != null && !$1.isEmpty()) {
- double n = "-=".equals($1) ? -1 : 1;
+ if (part1 != null && !part1.isEmpty()) {
+ double n = "-=".equals(part1) ? -1 : 1;
double st = Double.parseDouble(trsStart);
double en = Double.parseDouble(trsEnd);
trsEnd = "" + (st + (n*en));
@@ -121,7 +121,6 @@ public class TransitionsAnimation extends PropertiesAnimation {
resize = resize || "height".equals(key) || "width".equals(key);
move = move || "top".equals(key) || "left".equals(key);
}
- System.out.println(fx);
}
g.saveCssAttrs(ATTRS_TO_SAVE);
if (resize) {
@@ -136,10 +135,8 @@ public class TransitionsAnimation extends PropertiesAnimation {
public void run(int duration) {
onStart();
Properties p = getFxProperties(true);
- System.out.println(p.toJsonString());
g.css(p);
p = getFxProperties(false);
- System.out.println(p.toJsonString());
g.transition(p, duration - 150, easing, 0, new Function(){public void f() {
onComplete();
}});