diff options
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-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(); |