summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/surface.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-10-01 15:42:21 -0400
committerJules Laplace <jules@okfoc.us>2014-10-01 15:42:21 -0400
commit7afac43f11d1ccae6f3b8d1febcd293db11bd2b7 (patch)
tree1907a9157b11417a98c9dd065be28a788345fd54 /public/assets/javascripts/rectangles/models/surface.js
parent3eacd977bb5df5d379e0ee9cc554af8f8f2a5b6c (diff)
randomly place images on the walls
Diffstat (limited to 'public/assets/javascripts/rectangles/models/surface.js')
-rw-r--r--public/assets/javascripts/rectangles/models/surface.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/assets/javascripts/rectangles/models/surface.js b/public/assets/javascripts/rectangles/models/surface.js
index 53977c8..c85682a 100644
--- a/public/assets/javascripts/rectangles/models/surface.js
+++ b/public/assets/javascripts/rectangles/models/surface.js
@@ -36,7 +36,7 @@
Surface.prototype.fits = function(v){
var faces = this.faces
var scratch
- if (this.bounds.x.b < v.a || this.bounds.y.b < v.b) {
+ if (this.bounds.width() < v.a || this.bounds.height() < v.b) {
return null
}
for (var i = 0; i < faces.length; i++) {
@@ -46,7 +46,7 @@
}
scratch = new Rect (0,0,0,0)
for (var i = 0; i < faces.length; i++) {
- if (faces[i].y.length() < v.b) {
+ if (faces[i].height() < v.b) {
continue
}
scratch.x.a = faces[i].x.a