summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/room.js
diff options
context:
space:
mode:
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 ]
}