X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fcore%2FBox.java;h=bb8a27b94812b8bd954dbaa7ce2f9a445befe228;hp=0e95a7e2f1db531ddf117f5c2b88c0d458f9a438;hb=fffcafc33aa4066bdf85da7a32e1a1cdb9db2d6f;hpb=5f0b1c28e1c93b3fc14236fa9eb9742aa3304377 diff --git a/src/org/ibex/core/Box.java b/src/org/ibex/core/Box.java index 0e95a7e..bb8a27b 100644 --- a/src/org/ibex/core/Box.java +++ b/src/org/ibex/core/Box.java @@ -232,7 +232,7 @@ public final class Box extends JSScope implements Task { void resize(int x, int y, int width, int height) { if (x == this.x && y == this.y && width == this.width && height == this.height) return; - boolean sizechange = (this.width != width || this.height != height) && getTrap("SizeChange") != null; + boolean sizechange = (this.width != width || this.height != height) && hasTrap("SizeChange"); int thisx = parent == null ? 0 : this.x; int thisy = parent == null ? 0 : this.y; Box who = (parent == null ? this : parent); @@ -448,7 +448,7 @@ public final class Box extends JSScope implements Task { case "distanceto": Box b = (Box)a0; - JS ret = new JS(); + JS ret = new JS.O(); ret.put("x", N(b.localToGlobalX(0) - localToGlobalX(0))); ret.put("y", N(b.localToGlobalY(0) - localToGlobalY(0))); return ret; @@ -518,7 +518,7 @@ public final class Box extends JSScope implements Task { throw new Error("unreachable"); // unreachable } - private class Mouse extends JS.Cloneable { + private class Mouse extends JS implements JS.Cloneable { public Object get(Object key) { //#switch(key) case "x": return N(globalToLocalX(getSurface()._mousex));