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.html | 12 +-----
js/panels/Timeline/Span.reel/Span.js | 20 ++++-----
js/panels/Timeline/Span.reel/scss/Span.scss | 64 -----------------------------
3 files changed, 10 insertions(+), 86 deletions(-)
(limited to 'js/panels/Timeline/Span.reel')
diff --git a/js/panels/Timeline/Span.reel/Span.html b/js/panels/Timeline/Span.reel/Span.html
index a1f3afeb..6e643daa 100644
--- a/js/panels/Timeline/Span.reel/Span.html
+++ b/js/panels/Timeline/Span.reel/Span.html
@@ -15,8 +15,7 @@
"properties": {
"element": {"#": "spanspace"},
"container_easing" : {"#" : "container_easing"},
- "easing_choice" : {"#": "easing_choice"},
- "easing_choices" : {"#" : "easing_choices"}
+ "easing_choice" : {"#": "easing_choice"}
}
}
@@ -27,17 +26,10 @@
-
+
ease-out
-
- - ease
- - ease-out
- - ease-in
- - ease-in-out
- - linear
-
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: {
diff --git a/js/panels/Timeline/Span.reel/scss/Span.scss b/js/panels/Timeline/Span.reel/scss/Span.scss
index b3aff4d2..6afb4780 100644
--- a/js/panels/Timeline/Span.reel/scss/Span.scss
+++ b/js/panels/Timeline/Span.reel/scss/Span.scss
@@ -35,67 +35,3 @@
opacity: 0.4;
}
-/*
- * Easing picker
- */
-
-.container-easing {
- position: absolute;
- top: 2px;
- right: 8px;
- font-size: 10px;
- line-height: 8px;
- border: 1px solid $color-menu-border;
- color: $color-menu-text;
- background-color: $color-menu-bg;
-}
-.container-easing,
-.container-easing .easing-choice,
-.container-easing .easing-choices {
- width: 70px;
- white-space: nowrap;
-}
-.container-easing,
-.container-easing .easing-choice {
- height: 10px;
-}
-.container-easing .easing-choice {
- position: absolute;
- top: 0px;
- left: 3px;
- width: 67px;
- cursor: pointer;
-}
-.container-easing .easing-choices {
- position: absolute;
- display: none;
- bottom: -1px;
- left: -1px;
- z-index: 100;
- height: auto;
- border: 1px solid $color-menu-border;
- color: $color-menu-text;
- background-color: $color-menu-bg;
- overflow: hidden;
- list-style-type: none;
- margin: 0px;
- padding: 0px;
-}
-.container-easing .easing-choices li {
- list-style-type: none;
- margin: 0px;
- padding: 0px;
- padding-top: 2px;
- padding-bottom: 2px;
- padding-left: 3px;
- cursor: pointer;
-}
-
-.container-easing .easing-choices li:hover,
-.container-easing .easing-choices li.easing-selected {
- color: $color-menu-hilite-text;
- background-color: $color-menu-hilite-bg;
-}
-.container-easing .easing-choices li.easing-selected {
- cursor: default;
-}
--
cgit v1.2.3