aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/undo-controller.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-07 10:32:20 -0800
committerNivesh Rajbhandari2012-03-07 10:32:20 -0800
commitf5b0162a9b148589f0ccc65a0332695ea6fd6be3 (patch)
treee62ae1bc8a14dfa60cca05d40227c13dbfa2746a /js/controllers/undo-controller.js
parent443a23289171bb72324e740d8eaa041968a1de99 (diff)
parentcef07085443b7c31e878daaad083b7408c57e104 (diff)
downloadninja-f5b0162a9b148589f0ccc65a0332695ea6fd6be3.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Diffstat (limited to 'js/controllers/undo-controller.js')
-rwxr-xr-xjs/controllers/undo-controller.js17
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