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);
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;