diff options
author | Kruti Shah | 2012-02-08 09:45:29 -0800 |
---|---|---|
committer | Kruti Shah | 2012-02-08 09:45:29 -0800 |
commit | 6787bda807ad3974b29cab77628cc5c3c1b06a9d (patch) | |
tree | 61d2439e2edb0dd9c84b5f32fe35e57707b87637 /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |
parent | 2cfa420f48735e2718cd0824d4e945c72158d0fa (diff) | |
parent | 91df2e8030db394060667202a97138db3f871fa5 (diff) | |
download | ninja-6787bda807ad3974b29cab77628cc5c3c1b06a9d.tar.gz |
Merge branch 'refs/heads/Timeline' into Timeline_updated
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 15 |
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(); |