diff options
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 10 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 41 |
2 files changed, 34 insertions, 17 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index b022bd8a..7f8d421d 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -905,6 +905,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
905 | } | 905 | } |
906 | }, | 906 | }, |
907 | 907 | ||
908 | handleKeyframeShortcut:{ | ||
909 | value:function(){ | ||
910 | //console.log(this.currentLayersSelected); | ||
911 | //console.log(this.trackRepetition); | ||
912 | var tempEv = {}; | ||
913 | tempEv.offsetX = this.playheadmarker.offsetLeft; | ||
914 | this.trackRepetition.childComponents[this.currentLayersSelected[0]].handleKeyboardShortcut(tempEv); | ||
915 | } | ||
916 | }, | ||
917 | |||
908 | updateTrackContainerWidth:{ | 918 | updateTrackContainerWidth:{ |
909 | value:function () { | 919 | value:function () { |
910 | this.container_tracks.style.width = (this.end_hottext.value * 80) + "px"; | 920 | this.container_tracks.style.width = (this.end_hottext.value * 80) + "px"; |
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 | }, |