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 | |
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')
-rwxr-xr-x | js/controllers/selection-controller.js | 2 | ||||
-rwxr-xr-x | js/controllers/undo-controller.js | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/js/controllers/selection-controller.js b/js/controllers/selection-controller.js index c4623d3f..08eb018f 100755 --- a/js/controllers/selection-controller.js +++ b/js/controllers/selection-controller.js | |||
@@ -98,6 +98,8 @@ exports.SelectionController = Montage.create(Component, { | |||
98 | this._isDocument = false; | 98 | this._isDocument = false; |
99 | } | 99 | } |
100 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); | 100 | NJevent("selectionChange", {"elements": this.application.ninja.selectedElements, "isDocument": this._isDocument} ); |
101 | |||
102 | this._selectionContainer = this.application.ninja.currentSelectedContainer; | ||
101 | } | 103 | } |
102 | }, | 104 | }, |
103 | 105 | ||
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 |