2003/12/25 23:54:52
[org.ibex.core.git] / src / org / xwt / Box.java
index 0e4a30b..3e2599b 100644 (file)
@@ -176,8 +176,8 @@ public final class Box extends JSScope implements Scheduler.Task {
         // FIXME; we can't assume that just because we were performed the image is loaded.
         // as external events have occured, check the state of box
         if (texture != null) {
-           if (texture.isLoaded) { minwidth = texture.width; minheight = texture.height; }
-           else { Res res = texture.res; texture = null; throw new JSExn("image not found: "+res); }
+            if (texture.isLoaded) { minwidth = min(texture.width, maxwidth); minheight = min(texture.height, maxheight); }
+            else { Res res = texture.res; texture = null; throw new JSExn("image not found: "+res); }
         }
 
         MARK_REPACK;
@@ -355,6 +355,7 @@ public final class Box extends JSScope implements Scheduler.Task {
         int globaly = parenty + (parent == null ? 0 : y);
 
         // intersect the x,y,w,h rendering window with ourselves; quit if it's empty
+
         if (!test(NOCLIP)) {
             cx1 = max(cx1, parent == null ? 0 : globalx);
             cy1 = max(cy1, parent == null ? 0 : globaly);