summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/room.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-04-16 18:32:32 -0400
committerJules Laplace <jules@okfoc.us>2014-04-16 18:32:32 -0400
commitd3602a9259e3be57eafca37d399d10b12f460f74 (patch)
tree5e668e96f3b13eb0f3cab74024f5510a94854b23 /assets/javascripts/rectangles/room.js
parent3412cc42a9fa5e42d47073a2fa05a39712ad40f7 (diff)
ceiling, floor
Diffstat (limited to 'assets/javascripts/rectangles/room.js')
-rw-r--r--assets/javascripts/rectangles/room.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/assets/javascripts/rectangles/room.js b/assets/javascripts/rectangles/room.js
index 795ef29..8c9d67d 100644
--- a/assets/javascripts/rectangles/room.js
+++ b/assets/javascripts/rectangles/room.js
@@ -1,10 +1,10 @@
window.room = (function(){
var room = function(opt){
- this.id = opt.id
+ this.id = opt.id || clipper.rooms.length
this.rect = opt.rect
this.regions = []
- this.height = 500
+ this.height = opt.height || 200
this.focused = false
}
@@ -14,6 +14,7 @@ window.room = (function(){
room.prototype.reset = function(){
var copy = this.rect.clone()
+ copy.id = this.id
copy.sides = FRONT | BACK | LEFT | RIGHT
this.regions = [ copy ]
}