diff options
Diffstat (limited to 'js/panels/Timeline/Span.reel')
-rw-r--r-- | js/panels/Timeline/Span.reel/Span.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js index 0b4ab8fc..7c959fad 100644 --- a/js/panels/Timeline/Span.reel/Span.js +++ b/js/panels/Timeline/Span.reel/Span.js | |||
@@ -51,7 +51,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
51 | this.needsDraw = true; | 51 | this.needsDraw = true; |
52 | } | 52 | } |
53 | }, | 53 | }, |
54 | 54 | ||
55 | _isHighlighted: { | 55 | _isHighlighted: { |
56 | value: false | 56 | value: false |
57 | }, | 57 | }, |
@@ -66,7 +66,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
66 | } | 66 | } |
67 | } | 67 | } |
68 | }, | 68 | }, |
69 | 69 | ||
70 | _areChoicesVisible: { | 70 | _areChoicesVisible: { |
71 | value: false | 71 | value: false |
72 | }, | 72 | }, |
@@ -81,7 +81,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | }, | 83 | }, |
84 | 84 | ||
85 | _easing: { | 85 | _easing: { |
86 | value: "none" | 86 | value: "none" |
87 | }, | 87 | }, |
@@ -102,14 +102,14 @@ var Span = exports.Span = Montage.create(Component, { | |||
102 | } | 102 | } |
103 | } | 103 | } |
104 | }, | 104 | }, |
105 | 105 | ||
106 | // BEGIN: draw cycle | 106 | // BEGIN: draw cycle |
107 | prepareForDraw: { | 107 | prepareForDraw: { |
108 | value: function() { | 108 | value: function() { |
109 | this.init(); | 109 | this.init(); |
110 | } | 110 | } |
111 | }, | 111 | }, |
112 | 112 | ||
113 | draw:{ | 113 | draw:{ |
114 | value: function(){ | 114 | value: function(){ |
115 | this.element.style.width = this.spanWidth + "px"; | 115 | this.element.style.width = this.spanWidth + "px"; |
@@ -132,14 +132,14 @@ var Span = exports.Span = Montage.create(Component, { | |||
132 | this.container_easing.setAttribute("style", ""); | 132 | this.container_easing.setAttribute("style", ""); |
133 | this.easing_choice.setAttribute("style", ""); | 133 | this.easing_choice.setAttribute("style", ""); |
134 | } | 134 | } |
135 | 135 | ||
136 | // Highlight the span? | 136 | // Highlight the span? |
137 | if (this.isHighlighted === true) { | 137 | if (this.isHighlighted === true) { |
138 | this.element.classList.add("spanHighlight"); | 138 | this.element.classList.add("spanHighlight"); |
139 | } else { | 139 | } else { |
140 | this.element.classList.remove("spanHighlight"); | 140 | this.element.classList.remove("spanHighlight"); |
141 | } | 141 | } |
142 | 142 | ||
143 | /* | 143 | /* |
144 | // Hide or show the choices menu? | 144 | // Hide or show the choices menu? |
145 | if (this.areChoicesVisible === true) { | 145 | if (this.areChoicesVisible === true) { |
@@ -148,12 +148,12 @@ var Span = exports.Span = Montage.create(Component, { | |||
148 | this.easing_choices.style.display = "none"; | 148 | this.easing_choices.style.display = "none"; |
149 | } | 149 | } |
150 | */ | 150 | */ |
151 | 151 | ||
152 | // Change easing? | 152 | // Change easing? |
153 | if (this.easing_choice.innerText !== this.easing) { | 153 | if (this.easing_choice.innerText !== this.easing) { |
154 | this.easing_choice.innerText = this.easing; | 154 | this.easing_choice.innerText = this.easing; |
155 | } | 155 | } |
156 | 156 | ||
157 | } | 157 | } |
158 | }, | 158 | }, |
159 | 159 | ||
@@ -165,7 +165,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
165 | 165 | ||
166 | } | 166 | } |
167 | }, | 167 | }, |
168 | 168 | ||
169 | highlightSpan:{ | 169 | highlightSpan:{ |
170 | value: function(){ | 170 | value: function(){ |
171 | // Class add/remove should only be done in draw cycle. | 171 | // Class add/remove should only be done in draw cycle. |
@@ -173,7 +173,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
173 | this.isHighlighted = true; | 173 | this.isHighlighted = true; |
174 | } | 174 | } |
175 | }, | 175 | }, |
176 | 176 | ||
177 | handleEasingChoiceClick: { | 177 | handleEasingChoiceClick: { |
178 | value: function(event) { | 178 | value: function(event) { |
179 | event.stopPropagation(); | 179 | event.stopPropagation(); |
@@ -191,7 +191,7 @@ var Span = exports.Span = Montage.create(Component, { | |||
191 | do { | 191 | do { |
192 | objReturn.left += obj.offsetLeft; | 192 | objReturn.left += obj.offsetLeft; |
193 | objReturn.top += obj.offsetTop; | 193 | objReturn.top += obj.offsetTop; |
194 | 194 | ||
195 | } while (obj = obj.offsetParent); | 195 | } while (obj = obj.offsetParent); |
196 | } | 196 | } |
197 | return objReturn; | 197 | return objReturn; |
@@ -209,21 +209,21 @@ var Span = exports.Span = Montage.create(Component, { | |||
209 | 209 | ||
210 | // Remove the pointer to ourselves | 210 | // Remove the pointer to ourselves |
211 | //this.application.ninja.timeline.currentOpenSpanMenu = false; | 211 | //this.application.ninja.timeline.currentOpenSpanMenu = false; |
212 | 212 | ||
213 | // Un-highlight the old choice and highlight the new choice | 213 | // Un-highlight the old choice and highlight the new choice |
214 | this.application.ninja.timeline.easingMenu.popup.contentEl.querySelector(".easing-selected").classList.remove("easing-selected"); | 214 | this.application.ninja.timeline.easingMenu.popup.contentEl.querySelector(".easing-selected").classList.remove("easing-selected"); |
215 | event.target.classList.add("easing-selected"); | 215 | event.target.classList.add("easing-selected"); |
216 | 216 | ||
217 | // Set the easing | 217 | // Set the easing |
218 | this.easing = event.target.dataset.ninjaEase; | 218 | this.easing = event.target.dataset.ninjaEase; |
219 | this.parentComponent.easing = this.easing; | 219 | this.parentComponent.easing = this.easing; |
220 | this.parentComponent.tweenData.easing = this.easing; | 220 | this.parentComponent.tweenData.easing = this.easing; |
221 | 221 | ||
222 | // Unbind the event handler | 222 | // Unbind the event handler |
223 | this.application.ninja.timeline.easingMenu.popup.contentEl.removeEventListener("click"); | 223 | this.application.ninja.timeline.easingMenu.popup.contentEl.removeEventListener("click"); |
224 | 224 | ||
225 | // Hide the menu. | 225 | // Hide the menu. |
226 | this.hideEasingMenu(); | 226 | this.hideEasingMenu(); |
227 | } | 227 | } |
228 | }, | 228 | }, |
229 | hideEasingMenu: { | 229 | hideEasingMenu: { |