diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-09-30 18:12:39 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-09-30 18:12:39 -0400 |
| commit | 5d567454d7d2f4f7e885720d310d42063eeba4dd (patch) | |
| tree | 236908c9ddabb1153ab6c9825068eb2447af2386 /public/assets/javascripts | |
| parent | 5b7bfeaf842d6adeca508fa3bbfef63529bbe5cc (diff) | |
undo fix
Diffstat (limited to 'public/assets/javascripts')
| -rw-r--r-- | public/assets/javascripts/rectangles/engine/rooms/_walls.js | 4 | ||||
| -rw-r--r-- | public/assets/javascripts/rectangles/engine/scenery/undo.js | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/public/assets/javascripts/rectangles/engine/rooms/_walls.js b/public/assets/javascripts/rectangles/engine/rooms/_walls.js index 82ccb87..f0cd558 100644 --- a/public/assets/javascripts/rectangles/engine/rooms/_walls.js +++ b/public/assets/javascripts/rectangles/engine/rooms/_walls.js @@ -46,6 +46,10 @@ } } + base.find = function(id){ + return base.lookup[id] + } + base.assign = function(list){ base.list = list base.lookup = {} diff --git a/public/assets/javascripts/rectangles/engine/scenery/undo.js b/public/assets/javascripts/rectangles/engine/scenery/undo.js index e5624a0..57a0886 100644 --- a/public/assets/javascripts/rectangles/engine/scenery/undo.js +++ b/public/assets/javascripts/rectangles/engine/scenery/undo.js @@ -10,6 +10,7 @@ }, redo: function(state){ Scenery.deserialize([ state ]) + Scenery.resize.show( scenery ) // TODO: watch individual scenery object here Minotaur.watch( app.router.editorView.settings ) @@ -19,6 +20,7 @@ type: "update-scenery", undo: function(state){ var scenery = Scenery.find(state.id) + scenery.deserialize(state) scenery.set_wall(Walls.find( state.wall_id )) @@ -48,6 +50,7 @@ type: "destroy-scenery", undo: function(state){ Scenery.deserialize([ state ]) + Scenery.resize.show( scenery ) // TODO: watch individual scenery object here Minotaur.watch( app.router.editorView.settings ) |
