From d3602a9259e3be57eafca37d399d10b12f460f74 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 16 Apr 2014 18:32:32 -0400 Subject: ceiling, floor --- assets/javascripts/rectangles/room.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'assets/javascripts/rectangles/room.js') 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 ] } -- cgit v1.2.3-70-g09d2