aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java21
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java17
-rw-r--r--[-rwxr-xr-x]gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java10
3 files changed, 41 insertions, 7 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
index 220ec36b..2570f411 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java
@@ -2458,7 +2458,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
/**
* Set the height style property of every matched element. It's useful for using 'percent' or 'em'
- * units Example: $(".a").width("100%")
+ * units Example: $(".a").height("100%")
*/
public GQuery height(String height) {
return css("height", height);
@@ -2873,7 +2873,7 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* selector that determines the content to be loaded.
*
*/
- public GQuery load(String url, Properties data, final Function onSuccess) {
+ public GQuery load(String url, IsProperties data, final Function onSuccess) {
return as(Ajax.Ajax).load(url, data, onSuccess);
}
@@ -4269,6 +4269,15 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
* callback after completion. Only the height is adjusted for this animation, causing all matched
* elements to be hidden or shown in a "sliding" manner
*/
+ public Effects slideToggle(Function... f) {
+ return as(Effects).slideToggle(f);
+ }
+
+ /**
+ * Toggle the visibility of all matched elements by adjusting their height and firing an optional
+ * callback after completion. Only the height is adjusted for this animation, causing all matched
+ * elements to be hidden or shown in a "sliding" manner
+ */
public Effects slideToggle(int millisecs, Function... f) {
return as(Effects).slideToggle(millisecs, f);
}
@@ -4823,6 +4832,14 @@ public class GQuery implements Lazy<GQuery, LazyGQuery> {
}
/**
+ * Set the width style property of every matched element. It's useful for using 'percent' or 'em'
+ * units Example: $(".a").width("100%")
+ */
+ public GQuery width(String width) {
+ return css("width", width);
+ }
+
+ /**
* Wrap each matched element with the specified HTML content. This wrapping process is most useful
* for injecting additional structure into a document, without ruining the original semantic
* qualities of a document. This works by going through the first element provided (which is
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
index 992598e5..af506174 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/LazyGQuery.java
@@ -1108,7 +1108,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
/**
* Set the height style property of every matched element. It's useful for using 'percent' or 'em'
- * units Example: $(".a").width("100%")
+ * units Example: $(".a").height("100%")
*/
LazyGQuery<T> height(String height);
@@ -1414,7 +1414,7 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* selector that determines the content to be loaded.
*
*/
- LazyGQuery<T> load(String url, Properties data, Function onSuccess);
+ LazyGQuery<T> load(String url, IsProperties data, Function onSuccess);
/**
* Reduce the set of matched elements to all elements before a given position. The position of the
@@ -2172,6 +2172,13 @@ public interface LazyGQuery<T> extends LazyBase<T>{
* callback after completion. Only the height is adjusted for this animation, causing all matched
* elements to be hidden or shown in a "sliding" manner
*/
+ Effects slideToggle(Function... f);
+
+ /**
+ * Toggle the visibility of all matched elements by adjusting their height and firing an optional
+ * callback after completion. Only the height is adjusted for this animation, causing all matched
+ * elements to be hidden or shown in a "sliding" manner
+ */
Effects slideToggle(int millisecs, Function... f);
/**
@@ -2459,6 +2466,12 @@ public interface LazyGQuery<T> extends LazyBase<T>{
LazyGQuery<T> width(int width);
/**
+ * Set the width style property of every matched element. It's useful for using 'percent' or 'em'
+ * units Example: $(".a").width("100%")
+ */
+ LazyGQuery<T> width(String width);
+
+ /**
* Wrap each matched element with the specified HTML content. This wrapping process is most useful
* for injecting additional structure into a document, without ruining the original semantic
* qualities of a document. This works by going through the first element provided (which is
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 df3da8f3..29b73548 100755..100644
--- 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
@@ -249,10 +249,14 @@ public class TransitionsAnimation extends PropertiesAnimation {
@Override
public void run(int duration) {
onStart();
+
+ // Compute initial properties
Properties p = getFxProperties(true);
- g.css(p);
- // TODO: Reflow, it seems it is not needed in chrome and FF, check other browsers
- // g.css("offsetHeight");
+ g.css(p)
+ // Some browsers need after setting initial properties re-flow (FF 24.4.0).
+ .offset();
+
+ // Compute final properties
p = getFxProperties(false);
g.transition(p, duration, easing, delay, new Function(){public void f() {
onComplete();