From a11ef2eed7049835c8bdfa50a2b893632c46eaa0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 11:11:58 -0700 Subject: 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 --- js/ninja.reel/ninja.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/ninja.reel/ninja.js') 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 @@ var Montage = require("montage/core/core").Montage, Component = require("montage/ui/component").Component, + UndoManager = require("montage/core/undo-manager").UndoManager, AppData = require("js/data/appdata").AppData; var matrix = require("js/lib/math/matrix"); @@ -121,7 +122,7 @@ exports.Ninja = Montage.create(Component, { templateDidLoad: { value: function() { this.ninjaVersion = window.ninjaVersion.ninja.version; - this.eventManager.addEventListener( "preloadFinish", this, false); + this.undoManager = document.application.undoManager = UndoManager.create(); } }, @@ -140,7 +141,6 @@ exports.Ninja = Montage.create(Component, { window.addEventListener("resize", this, false); -// this.eventManager.addEventListener( "appLoading", this, false); // Don't need this anymore this.eventManager.addEventListener( "selectTool", this, false); this.eventManager.addEventListener( "selectSubTool", this, false); this.eventManager.addEventListener( "onOpenDocument", this, false); -- cgit v1.2.3