aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Duran2012-02-07 07:50:50 -0800
committerJonathan Duran2012-02-07 07:50:50 -0800
commit156b0648c6b046f74303221ce632a49fb28c9a8a (patch)
tree9fd8839ac19024af2e248cbd196200fa3d66bfea
parentfd26b97aa192ef74d21f7517a2608bb9b8a35265 (diff)
downloadninja-156b0648c6b046f74303221ce632a49fb28c9a8a.tar.gz
Hookup track animations to layer element
Signed-off-by: Jonathan Duran <jduran@motorola.com>
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 13529115..5b1354d2 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -199,11 +199,16 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
199 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span 199 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span
200 // This needs to move to a keyboard shortcut that is TBD 200 // This needs to move to a keyboard shortcut that is TBD
201 if (ev.shiftKey) { 201 if (ev.shiftKey) {
202 if (this.tweens.length < 1) { 202 if(this.application.ninja.timeline.arrLayers[this.trackID - 1].element.length == 1){
203 this.addAnimationRuleToElement(); 203 if (this.tweens.length < 1) {
204 this.insertTween(0); 204 this.addAnimationRuleToElement();
205 this.insertTween(0);
206 }
207 this.handleNewTween(ev);
208 } else {
209 alert("There much be only one element in an animated layer.")
205 } 210 }
206 this.handleNewTween(ev); 211
207 } 212 }
208 } 213 }
209 }, 214 },
@@ -268,7 +273,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
268 273
269 addAnimationRuleToElement:{ 274 addAnimationRuleToElement:{
270 value: function(){ 275 value: function(){
271 var theElement = this.application.ninja.currentDocument._document.getElementById(this.application.ninja.timeline.arrLayers[this.trackID - 1].layerName); 276 var theElement = this.application.ninja.timeline.arrLayers[this.trackID - 1].element[0];
272 this.animatedElement = theElement; 277 this.animatedElement = theElement;
273 278
274 var initAnimatedProperties = new Array(); 279 var initAnimatedProperties = new Array();