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/controllers/presets-controller.js | |
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/controllers/presets-controller.js')
-rw-r--r-- | js/controllers/presets-controller.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/js/controllers/presets-controller.js b/js/controllers/presets-controller.js index 7152ba93..0467f73c 100644 --- a/js/controllers/presets-controller.js +++ b/js/controllers/presets-controller.js | |||
@@ -59,16 +59,14 @@ exports.PresetsController = Montage.create(Component, { | |||
59 | }, this); | 59 | }, this); |
60 | 60 | ||
61 | selection.forEach(function(element) { | 61 | selection.forEach(function(element) { |
62 | var el = element._element; | ||
63 | |||
64 | if(useTransition) { | 62 | if(useTransition) { |
65 | this.addTransition(el); | 63 | this.addTransition(element); |
66 | } | 64 | } |
67 | 65 | ||
68 | el.classList.add(selectorBase); | 66 | element.classList.add(selectorBase); |
69 | 67 | ||
70 | //// Keep track of elements with presets and don't add duplicates | 68 | //// Keep track of elements with presets and don't add duplicates |
71 | this.setCachedPreset(el, presetData.id, rules); | 69 | this.setCachedPreset(element, presetData.id, rules); |
72 | 70 | ||
73 | }, this); | 71 | }, this); |
74 | 72 | ||