From ad826c4664531e1d110f832a576b16d7fe1f29ee Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Sun, 20 Apr 2014 09:07:25 +0200 Subject: Fix infinite loop --- gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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..96695649 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 @@ -2873,7 +2873,7 @@ public class GQuery implements Lazy { * 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); } -- cgit v1.2.3 From 88fa4bdc3375b2912f01287cd52c789ccd66a40f Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 21 Apr 2014 22:05:09 +0200 Subject: Reflow is needed in FF. --- .../gwt/query/client/plugins/effects/TransitionsAnimation.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) mode change 100755 => 100644 gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/TransitionsAnimation.java 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 old mode 100755 new mode 100644 index df3da8f3..29b73548 --- 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(); -- cgit v1.2.3 From 012e5bdfec224b30ef6821c1703af1483b1f7002 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 21 Apr 2014 23:37:28 +0200 Subject: Adding missing methods --- .../main/java/com/google/gwt/query/client/GQuery.java | 19 ++++++++++++++++++- .../java/com/google/gwt/query/client/LazyGQuery.java | 17 +++++++++++++++-- 2 files changed, 33 insertions(+), 3 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 96695649..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 { /** * 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); @@ -4264,6 +4264,15 @@ public class GQuery implements Lazy { return as(Effects).slideDown(millisecs, 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(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 @@ -4822,6 +4831,14 @@ public class GQuery implements Lazy { return this; } + /** + * 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 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 extends LazyBase{ /** * 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 height(String height); @@ -1414,7 +1414,7 @@ public interface LazyGQuery extends LazyBase{ * selector that determines the content to be loaded. * */ - LazyGQuery load(String url, Properties data, Function onSuccess); + LazyGQuery load(String url, IsProperties data, Function onSuccess); /** * Reduce the set of matched elements to all elements before a given position. The position of the @@ -2167,6 +2167,13 @@ public interface LazyGQuery extends LazyBase{ */ Effects slideDown(int millisecs, 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(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 @@ -2458,6 +2465,12 @@ public interface LazyGQuery extends LazyBase{ */ LazyGQuery 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 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 -- cgit v1.2.3