diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-08-12 18:49:01 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-08-12 18:49:01 -0400 |
| commit | b8b208d219cf782c39d054ad741724c6995a0b62 (patch) | |
| tree | 7f77e4c10c3d86d7a80d6cf1c8ff20f9c1e393c3 /public/assets/javascripts/rectangles/models | |
| parent | 838ccfe6c2125e464d3c95c6e222e7e762dc8fd2 (diff) | |
undo stuff working on rooms editor
Diffstat (limited to 'public/assets/javascripts/rectangles/models')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/rect.js | 4 | ||||
| -rw-r--r-- | public/assets/javascripts/rectangles/models/room.js | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/public/assets/javascripts/rectangles/models/rect.js b/public/assets/javascripts/rectangles/models/rect.js index 0642a65..3f94740 100644 --- a/public/assets/javascripts/rectangles/models/rect.js +++ b/public/assets/javascripts/rectangles/models/rect.js @@ -40,8 +40,8 @@ return new Rect( this.x.clone(), this.y.clone() ) } Rect.prototype.assign = function(r) { - this.x.copy(r.x) - this.y.copy(r.y) + this.x.assign(r.x) + this.y.assign(r.y) } Rect.prototype.center = function(){ return new vec2(this.x.midpoint(), this.y.midpoint()) diff --git a/public/assets/javascripts/rectangles/models/room.js b/public/assets/javascripts/rectangles/models/room.js index 6c0e1bb..aa18f6d 100644 --- a/public/assets/javascripts/rectangles/models/room.js +++ b/public/assets/javascripts/rectangles/models/room.js @@ -40,12 +40,12 @@ this.focused = false } - Room.prototype.clone = function(){ - return new Room ({ + Room.prototype.copy = function(){ + return { id: this.id, rect: this.rect.clone(), height: this.height, - }) + } } Room.prototype.toString = function(){ |
