diff options
author | Ananya Sen | 2012-02-28 15:33:35 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-28 15:33:35 -0800 |
commit | e0fab951e4f3869b04fd4a01f429a6654991cd68 (patch) | |
tree | 34de9dfb8bf769ad70d7d6ca16d603e91af26a27 /js | |
parent | 1766c6b17e2311fcd21c2be6608c7dcdc0a9b23a (diff) | |
download | ninja-e0fab951e4f3869b04fd4a01f429a6654991cd68.tar.gz |
minor fixes in saving undo/redo stacks per document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/undo-controller.js | 8 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/js/controllers/undo-controller.js b/js/controllers/undo-controller.js index 01853593..19cfb6e6 100755 --- a/js/controllers/undo-controller.js +++ b/js/controllers/undo-controller.js | |||
@@ -71,7 +71,7 @@ exports.UndoController = Montage.create( Component, { | |||
71 | /** | 71 | /** |
72 | * Undo Queue | 72 | * Undo Queue |
73 | */ | 73 | */ |
74 | _undoQueue: { value: [], writable:true }, | 74 | _undoQueue: { value: []}, |
75 | 75 | ||
76 | undoQueue: { | 76 | undoQueue: { |
77 | get: function() { | 77 | get: function() { |
@@ -85,7 +85,7 @@ exports.UndoController = Montage.create( Component, { | |||
85 | /** | 85 | /** |
86 | * Redo Queue | 86 | * Redo Queue |
87 | */ | 87 | */ |
88 | _redoQueue: { value: [], enumerable: false, writable:true }, | 88 | _redoQueue: { value: [], enumerable: false}, |
89 | 89 | ||
90 | redoQueue: { | 90 | redoQueue: { |
91 | get: function() { | 91 | get: function() { |
@@ -212,8 +212,8 @@ exports.UndoController = Montage.create( Component, { | |||
212 | 212 | ||
213 | clearHistory:{ | 213 | clearHistory:{ |
214 | value: function(){ | 214 | value: function(){ |
215 | this.undoQueue.splice(0, this.undoQueue.length); | 215 | this.undoQueue.length = 0; |
216 | this.redoQueue.splice(0, this.redoQueue.length); | 216 | this.redoQueue.length = 0; |
217 | } | 217 | } |
218 | } | 218 | } |
219 | }); \ No newline at end of file | 219 | }); \ No newline at end of file |
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index ab9503ec..6efeef8a 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -98,9 +98,6 @@ exports.Ninja = Montage.create(Component, { | |||
98 | if(this._appLoaded && this._preload) { | 98 | if(this._appLoaded && this._preload) { |
99 | // App is now deserialized and files are preloaded | 99 | // App is now deserialized and files are preloaded |
100 | this.appModel.materials = MaterialsLibrary.materials; | 100 | this.appModel.materials = MaterialsLibrary.materials; |
101 | |||
102 | this.currentDocument = null; | ||
103 | |||
104 | } | 101 | } |
105 | } | 102 | } |
106 | }, | 103 | }, |