diff options
author | Valerio Virgillito | 2012-04-04 11:11:58 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-04-04 11:11:58 -0700 |
commit | a11ef2eed7049835c8bdfa50a2b893632c46eaa0 (patch) | |
tree | fcbb067044d339daa49622537e934bf3a309db96 /js/ninja.reel | |
parent | c6de22bf42be90b403491b5f87b1818d9020310c (diff) | |
download | ninja-a11ef2eed7049835c8bdfa50a2b893632c46eaa0.tar.gz |
Squashed commit of Preparing for the montage undo-manager: Architecture changes
Reworked the add and remove elements into 1 function which can take 1 or more elements.
Removed the _element from the selection array
Many other changes related to those 2 changes
Undo/Redo shortcuts are now using montage undo/redo manager.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index ca094936..9cbbc9b9 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component, | 8 | Component = require("montage/ui/component").Component, |
9 | UndoManager = require("montage/core/undo-manager").UndoManager, | ||
9 | AppData = require("js/data/appdata").AppData; | 10 | AppData = require("js/data/appdata").AppData; |
10 | 11 | ||
11 | var matrix = require("js/lib/math/matrix"); | 12 | var matrix = require("js/lib/math/matrix"); |
@@ -121,7 +122,7 @@ exports.Ninja = Montage.create(Component, { | |||
121 | templateDidLoad: { | 122 | templateDidLoad: { |
122 | value: function() { | 123 | value: function() { |
123 | this.ninjaVersion = window.ninjaVersion.ninja.version; | 124 | this.ninjaVersion = window.ninjaVersion.ninja.version; |
124 | this.eventManager.addEventListener( "preloadFinish", this, false); | 125 | this.undoManager = document.application.undoManager = UndoManager.create(); |
125 | } | 126 | } |
126 | }, | 127 | }, |
127 | 128 | ||
@@ -140,7 +141,6 @@ exports.Ninja = Montage.create(Component, { | |||
140 | 141 | ||
141 | window.addEventListener("resize", this, false); | 142 | window.addEventListener("resize", this, false); |
142 | 143 | ||
143 | // this.eventManager.addEventListener( "appLoading", this, false); // Don't need this anymore | ||
144 | this.eventManager.addEventListener( "selectTool", this, false); | 144 | this.eventManager.addEventListener( "selectTool", this, false); |
145 | this.eventManager.addEventListener( "selectSubTool", this, false); | 145 | this.eventManager.addEventListener( "selectSubTool", this, false); |
146 | this.eventManager.addEventListener( "onOpenDocument", this, false); | 146 | this.eventManager.addEventListener( "onOpenDocument", this, false); |