aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Span.reel/Span.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Span.reel/Span.js')
-rw-r--r--js/panels/Timeline/Span.reel/Span.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js
index bb8fdf03..44316469 100644
--- a/js/panels/Timeline/Span.reel/Span.js
+++ b/js/panels/Timeline/Span.reel/Span.js
@@ -150,31 +150,42 @@ var Span = exports.Span = Montage.create(Component, {
150 value: function(event) { 150 value: function(event) {
151 event.stopPropagation(); 151 event.stopPropagation();
152 //this.areChoicesVisible = true; 152 //this.areChoicesVisible = true;
153 this.application.ninja.timeline.easingMenu.anchor = this.easing_choice;
154 this.application.ninja.timeline.easingMenu.currentChoice = event.currentTarget.innerText;
155 console.log(event);
156 this.application.ninja.timeline.easingMenu.top = 100;
157 this.application.ninja.timeline.easingMenu.left = 100;
153 this.application.ninja.timeline.easingMenu.show(); 158 this.application.ninja.timeline.easingMenu.show();
154 159 this.application.ninja.timeline.easingMenu.callingComponent = this;
155 } 160 }
156 }, 161 },
157 handleEasingChoicesClick: { 162 handleEasingChoicesClick: {
158 value: function(event) { 163 value: function(event) {
159 event.stopPropagation(); 164 event.stopPropagation();
165
166 console.log("span.handleEasingChoicesClick")
160 167
161 // Remove the pointer to ourselves 168 // Remove the pointer to ourselves
162 this.application.ninja.timeline.currentOpenSpanMenu = false; 169 //this.application.ninja.timeline.currentOpenSpanMenu = false;
163 170
164 // Un-highlight the old choice and highlight the new choice 171 // Un-highlight the old choice and highlight the new choice
165 this.easing_choices.querySelector(".easing-selected").classList.remove("easing-selected"); 172 this.application.ninja.timeline.easingMenu.popup.contentEl.querySelector(".easing-selected").classList.remove("easing-selected");
166 event.target.classList.add("easing-selected"); 173 event.target.classList.add("easing-selected");
167 174
168 // Set the easing 175 // Set the easing
169 this.easing = event.target.dataset.ninjaEase; 176 this.easing = event.target.dataset.ninjaEase;
170 177
178 // Unbind the event handler
179 this.application.ninja.timeline.easingMenu.popup.contentEl.removeEventListener("click");
180
171 // Hide the menu. 181 // Hide the menu.
172 this.hideEasingMenu(); 182 this.hideEasingMenu();
173 } 183 }
174 }, 184 },
175 hideEasingMenu: { 185 hideEasingMenu: {
176 value: function() { 186 value: function() {
177 this.areChoicesVisible = false; 187 //this.areChoicesVisible = false;
188 this.application.ninja.timeline.easingMenu.hide();
178 } 189 }
179 } 190 }
180}); 191});