aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
authorJonathan Duran2012-06-15 00:28:24 -0700
committerJonathan Duran2012-06-15 00:28:24 -0700
commit85dfdc9d46847d5fdd1b6fc6aaf35e93b09e9935 (patch)
tree6b73c6854b8b853646e49c10679178c26228b815 /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
parentf25c0450a5f75ee6937147c361aa95d3305a7e6a (diff)
downloadninja-85dfdc9d46847d5fdd1b6fc6aaf35e93b09e9935.tar.gz
F6 support for keyframes
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js41
1 files changed, 24 insertions, 17 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 6d557845..11c27ce3 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -649,25 +649,32 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
649 // This needs to move to a keyboard shortcut that is TBD 649 // This needs to move to a keyboard shortcut that is TBD
650 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 650 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
651 if (ev.shiftKey) { 651 if (ev.shiftKey) {
652 //if (this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList.length == 1) { 652 if (this.tweens.length < 1) {
653 if (this.tweens.length < 1) { 653 this.insertTween(0);
654 this.insertTween(0); 654 this.addAnimationRuleToElement(ev);
655 this.addAnimationRuleToElement(ev); 655 this.updateKeyframeRule();
656 } else {
657 if (ev.target.className === "tracklane") {
658 this.handleNewTween(ev);
659 this.updateKeyframeRule();
660 } else if (ev.target.className === "tween_span" && ev.target.parentElement.parentElement.className === "tracklane") {
661 this.handleNewTween(ev);
656 this.updateKeyframeRule(); 662 this.updateKeyframeRule();
657 } else {
658 //console.log(ev);
659 if (ev.target.className === "tracklane") {
660 this.handleNewTween(ev);
661 this.updateKeyframeRule();
662 } else if (ev.target.className === "tween_span" && ev.target.parentElement.parentElement.className === "tracklane"){
663 this.handleNewTween(ev);
664 this.updateKeyframeRule();
665 }
666 } 663 }
667 //} else { 664 }
668 // TEMP error check 665 }
669 //console.log("There must be exactly one element in an animated layer."); 666 }
670 //} 667 },
668
669 handleKeyboardShortcut:{
670 value:function(ev){
671 if (this.tweens.length < 1) {
672 this.insertTween(0);
673 this.addAnimationRuleToElement(ev);
674 this.updateKeyframeRule();
675 } else {
676 this.handleNewTween(ev);
677 this.updateKeyframeRule();
671 } 678 }
672 } 679 }
673 }, 680 },