fixed bug 527
[org.ibex.core.git] / 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);