aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Span.reel
diff options
context:
space:
mode:
authorKruti Shah2012-06-12 13:09:11 -0700
committerKruti Shah2012-06-12 13:09:11 -0700
commitd648c842905c7c53e0f89b943982493d2b79f56e (patch)
treeeb5585f92061975215f6d19305a8d1b76262e2fc /js/panels/Timeline/Span.reel
parentbedb38e14887b29eae3cdf1c8d435259c920257c (diff)
parentcf3b96822665751dae7a64644db3cb3960733c3d (diff)
downloadninja-d648c842905c7c53e0f89b943982493d2b79f56e.tar.gz
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts: js/controllers/elements/element-controller.js js/document/_toDelete/html-document.js js/panels/Timeline/Layer.reel/Layer.js Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/panels/Timeline/Span.reel')
-rw-r--r--js/panels/Timeline/Span.reel/Span.js27
1 files changed, 24 insertions, 3 deletions
diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js
index 1ab3455c..8d4c25ae 100644
--- a/js/panels/Timeline/Span.reel/Span.js
+++ b/js/panels/Timeline/Span.reel/Span.js
@@ -146,17 +146,38 @@ var Span = exports.Span = Montage.create(Component, {
146 146
147 handleEasingChoiceClick: { 147 handleEasingChoiceClick: {
148 value: function(event) { 148 value: function(event) {
149 event.stopPropagation();
149 this.areChoicesVisible = true; 150 this.areChoicesVisible = true;
151
152 // Possibly another menu is already open. If so, we need to close it.
153 if (this.application.ninja.timeline.currentOpenSpanMenu !== false) {
154 this.application.ninja.timeline.currentOpenSpanMenu.hideEasingMenu();
155 }
156
157 // Now store a pointer to ourselves for possible future use.
158 this.application.ninja.timeline.currentOpenSpanMenu = this;
150 } 159 }
151 }, 160 },
152 handleEasingChoicesClick: { 161 handleEasingChoicesClick: {
153 value: function(event) { 162 value: function(event) {
154 163 event.stopPropagation();
164
165 // Remove the pointer to ourselves
166 this.application.ninja.timeline.currentOpenSpanMenu = false;
167
168 // Un-highlight the old choice and highlight the new choice
155 this.easing_choices.querySelector(".easing-selected").classList.remove("easing-selected"); 169 this.easing_choices.querySelector(".easing-selected").classList.remove("easing-selected");
156 event.target.classList.add("easing-selected"); 170 event.target.classList.add("easing-selected");
171
172 // Set the easing
157 this.easing = event.target.dataset.ninjaEase; 173 this.easing = event.target.dataset.ninjaEase;
158 174
159 // Which element was just 175 // Hide the menu.
176 this.hideEasingMenu();
177 }
178 },
179 hideEasingMenu: {
180 value: function() {
160 this.areChoicesVisible = false; 181 this.areChoicesVisible = false;
161 } 182 }
162 } 183 }