Revision: 7250
Author: [email protected]
Date: Fri Dec 4 11:09:56 2009
Log: A set of fixes for three layout issues: 4160, 4241, and 4243.
Review by: jlabanca (desk check)
http://code.google.com/p/google-web-toolkit/source/detail?r=7250
Modified:
/trunk/user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java
/trunk/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java
=======================================
--- /trunk/user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java Tue
Dec 1 15:21:10 2009
+++ /trunk/user/src/com/google/gwt/user/client/ui/DockLayoutPanel.java Fri
Dec 4 11:09:56 2009
@@ -189,7 +189,7 @@
}
public void animate(int duration) {
- animate(0, null);
+ animate(duration, null);
}
public void animate(int duration, final Layout.AnimationCallback
callback) {
@@ -338,7 +338,15 @@
widget.removeFromParent();
// Logical attach.
- getChildren().add(widget);
+ WidgetCollection children = getChildren();
+ if (before == null) {
+ children.add(widget);
+ }
+ else {
+ int index = children.indexOf(before);
+ children.insert(widget, index);
+ }
+
if (direction == Direction.CENTER) {
center = widget;
}
=======================================
--- /trunk/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java Tue
Dec 1 15:35:53 2009
+++ /trunk/user/src/com/google/gwt/user/client/ui/StackLayoutPanel.java Fri
Dec 4 11:09:56 2009
@@ -211,7 +211,7 @@
}
private void animate(int duration) {
- int top = 0, bottom = 0;
+ double top = 0, bottom = 0;
int i = 0, visibleIndex = -1;
for (; i < layoutData.size(); ++i) {
LayoutData data = layoutData.get(i);
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors