diff options
author | Jose Antonio Marquez Russo | 2012-02-29 15:41:12 -0800 |
---|---|---|
committer | Jose Antonio Marquez Russo | 2012-02-29 15:41:12 -0800 |
commit | 13aca03d4e0d11729d691db0b7f0d2f2a6899cf6 (patch) | |
tree | dbd17232983247a38bb6b2cea480242bdf3f2422 /js/controllers/undo-controller.js | |
parent | b09956e4a9a35c5588cc7cd1f01efb617cbe0884 (diff) | |
parent | 8fee7d6bdb55ba18f396c3523081b18499fa1e30 (diff) | |
download | ninja-13aca03d4e0d11729d691db0b7f0d2f2a6899cf6.tar.gz |
Merge pull request #24 from ananyasen/FileIO
undo/redo per document , codemirror 2.22 update
Diffstat (limited to 'js/controllers/undo-controller.js')
-rwxr-xr-x | js/controllers/undo-controller.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/js/controllers/undo-controller.js b/js/controllers/undo-controller.js index 926803d3..19cfb6e6 100755 --- a/js/controllers/undo-controller.js +++ b/js/controllers/undo-controller.js | |||
@@ -71,22 +71,28 @@ exports.UndoController = Montage.create( Component, { | |||
71 | /** | 71 | /** |
72 | * Undo Queue | 72 | * Undo Queue |
73 | */ | 73 | */ |
74 | _undoQueue: { value: [] }, | 74 | _undoQueue: { value: []}, |
75 | 75 | ||
76 | undoQueue: { | 76 | undoQueue: { |
77 | get: function() { | 77 | get: function() { |
78 | return this._undoQueue; | 78 | return this._undoQueue; |
79 | }, | ||
80 | set: function(value){ | ||
81 | this._undoQueue = value; | ||
79 | } | 82 | } |
80 | }, | 83 | }, |
81 | 84 | ||
82 | /** | 85 | /** |
83 | * Redo Queue | 86 | * Redo Queue |
84 | */ | 87 | */ |
85 | _redoQueue: { value: [], enumerable: false }, | 88 | _redoQueue: { value: [], enumerable: false}, |
86 | 89 | ||
87 | redoQueue: { | 90 | redoQueue: { |
88 | get: function() { | 91 | get: function() { |
89 | return this._redoQueue; | 92 | return this._redoQueue; |
93 | }, | ||
94 | set: function(value){ | ||
95 | this._redoQueue = value; | ||
90 | } | 96 | } |
91 | }, | 97 | }, |
92 | 98 | ||
@@ -202,5 +208,12 @@ exports.UndoController = Montage.create( Component, { | |||
202 | this.redoQueue.splice(0, this.redoQueue.length); | 208 | this.redoQueue.splice(0, this.redoQueue.length); |
203 | //this.redoQueue = []; | 209 | //this.redoQueue = []; |
204 | } | 210 | } |
211 | }, | ||
212 | |||
213 | clearHistory:{ | ||
214 | value: function(){ | ||
215 | this.undoQueue.length = 0; | ||
216 | this.redoQueue.length = 0; | ||
217 | } | ||
205 | } | 218 | } |
206 | }); \ No newline at end of file | 219 | }); \ No newline at end of file |