From f97e4b6ab1db9fb7de18b2e44c1b0edcf2ba072d Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 12 Jun 2012 16:47:15 -0700 Subject: Timeline: New popup menu for easing choices. --- js/panels/Timeline/Span.reel/Span.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'js/panels/Timeline/Span.reel/Span.js') diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js index 8d4c25ae..bb8fdf03 100644 --- a/js/panels/Timeline/Span.reel/Span.js +++ b/js/panels/Timeline/Span.reel/Span.js @@ -4,8 +4,8 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; var Span = exports.Span = Montage.create(Component, { @@ -112,12 +112,14 @@ var Span = exports.Span = Montage.create(Component, { this.element.classList.remove("spanHighlight"); } + /* // Hide or show the choices menu? if (this.areChoicesVisible === true) { this.easing_choices.style.display = "block"; } else { this.easing_choices.style.display = "none"; } + */ // Change easing? if (this.easing_choice.innerText !== this.easing) { @@ -131,7 +133,7 @@ var Span = exports.Span = Montage.create(Component, { init: { value: function() { this.easing_choice.addEventListener("click", this.handleEasingChoiceClick.bind(this), false); - this.easing_choices.addEventListener("click", this.handleEasingChoicesClick.bind(this), false); + //this.easing_choices.addEventListener("click", this.handleEasingChoicesClick.bind(this), false); } }, @@ -147,15 +149,9 @@ var Span = exports.Span = Montage.create(Component, { handleEasingChoiceClick: { value: function(event) { event.stopPropagation(); - this.areChoicesVisible = true; - - // Possibly another menu is already open. If so, we need to close it. - if (this.application.ninja.timeline.currentOpenSpanMenu !== false) { - this.application.ninja.timeline.currentOpenSpanMenu.hideEasingMenu(); - } - - // Now store a pointer to ourselves for possible future use. - this.application.ninja.timeline.currentOpenSpanMenu = this; + //this.areChoicesVisible = true; + this.application.ninja.timeline.easingMenu.show(); + } }, handleEasingChoicesClick: { -- cgit v1.2.3