summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/surface.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/rectangles/models/surface.js')
-rw-r--r--public/assets/javascripts/rectangles/models/surface.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/assets/javascripts/rectangles/models/surface.js b/public/assets/javascripts/rectangles/models/surface.js
index 9b82e4e..0e0926f 100644
--- a/public/assets/javascripts/rectangles/models/surface.js
+++ b/public/assets/javascripts/rectangles/models/surface.js
@@ -193,7 +193,13 @@
else if (bounds.width() < width) {
intersection = bounds.y.intersection(face.y)
if (intersection.length() < height) {
- break
+ // here, since the element is tall enough, we can clobber the bounds completely
+ bounds.y.a = face.y.a
+ bounds.y.b = face.y.b
+ bounds.x.a = face.x.a
+ bounds.x.b = face.x.b
+ bounds.first = bounds.last = i
+ continue
}
else {
bounds.y.a = intersection.a