fixed bug 527
authoradam <adam@megacz.com>
Sat, 10 Apr 2004 03:18:04 +0000 (03:18 +0000)
committeradam <adam@megacz.com>
Sat, 10 Apr 2004 03:18:04 +0000 (03:18 +0000)
darcs-hash:20040410031804-5007d-6be55979c0d57b47b9060b34c88fd2d7a646fd4a.gz

src/org/ibex/Box.java

index fb4e985..4e6f374 100644 (file)
@@ -534,8 +534,8 @@ public final class Box extends JSScope implements Scheduler.Task {
         case "hshrink": return B(test(HSHRINK));
         case "vshrink": return B(test(VSHRINK));
         case "aspect": return N(aspect);
-        case "x": return (parent == null || !test(VISIBLE)) ? N(0) : N(x);
-        case "y": return (parent == null || !test(VISIBLE)) ? N(0) : N(y);
+        case "x": return (parent == null || !test(VISIBLE)) ? N(0) : test(PACKED) ? N(x) : N(ax);
+        case "y": return (parent == null || !test(VISIBLE)) ? N(0) : test(PACKED) ? N(y) : N(ay);
         case "cols": return test(FIXED) == COLS ? N(cols) : N(0);
         case "rows": return test(FIXED) == ROWS ? N(rows) : N(0);
         case "colspan": return N(colspan);