summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/scenery/undo.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-04 14:44:02 -0500
committerJules Laplace <jules@okfoc.us>2014-11-04 14:44:02 -0500
commit00778a168b7314039e95e856f6d41e05d0dbc4e4 (patch)
tree3c4485d42b969ffebc1fef781ab4d2e3f66bc3e5 /public/assets/javascripts/rectangles/engine/scenery/undo.js
parent9acdfee187cff9131e1add9e74a0eecb002ed1b5 (diff)
fix resize undo
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/scenery/undo.js')
-rw-r--r--public/assets/javascripts/rectangles/engine/scenery/undo.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/public/assets/javascripts/rectangles/engine/scenery/undo.js b/public/assets/javascripts/rectangles/engine/scenery/undo.js
index 998f7c6..6ad9e0d 100644
--- a/public/assets/javascripts/rectangles/engine/scenery/undo.js
+++ b/public/assets/javascripts/rectangles/engine/scenery/undo.js
@@ -21,9 +21,10 @@
type: "update-scenery",
undo: function(state){
var scenery = Scenery.find(state.id)
+ var wall = Walls.find( state.wall_id )
scenery.deserialize(state)
- scenery.set_wall(Walls.find( state.wall_id ))
+ scenery.set_wall({ wall: wall })
if (editor.permissions.resize) {
Scenery.resize.show(scenery)
@@ -34,13 +35,15 @@
},
redo: function(state){
var scenery = Scenery.find(state.id)
+ var wall = Walls.find( state.wall_id )
+
scenery.deserialize(state)
- scenery.set_wall(Walls.find( state.wall_id ))
+ scenery.set_wall({ wall: wall })
if (editor.permissions.resize) {
Scenery.resize.show(scenery)
- Scenery.resize.rotate_dots()
Scenery.resize.move_dots()
+ Scenery.resize.rotate_dots()
}
// TODO: watch individual scenery object here