summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-08-12 18:49:01 -0400
committerJules Laplace <jules@okfoc.us>2014-08-12 18:49:01 -0400
commitb8b208d219cf782c39d054ad741724c6995a0b62 (patch)
tree7f77e4c10c3d86d7a80d6cf1c8ff20f9c1e393c3 /public/assets/javascripts/rectangles/models
parent838ccfe6c2125e464d3c95c6e222e7e762dc8fd2 (diff)
undo stuff working on rooms editor
Diffstat (limited to 'public/assets/javascripts/rectangles/models')
-rw-r--r--public/assets/javascripts/rectangles/models/rect.js4
-rw-r--r--public/assets/javascripts/rectangles/models/room.js6
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(){