aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJonathan Duran2012-06-26 08:59:32 -0700
committerJonathan Duran2012-06-26 08:59:32 -0700
commite1d35d82d144d51a107a4facd47b47cffde79bcf (patch)
tree63e5383e79211cae8c44a4996bbadf6c6e4b8157 /js
parenteb9aab570b1d1d6e7544a3f3907e15e0d565bb00 (diff)
downloadninja-e1d35d82d144d51a107a4facd47b47cffde79bcf.tar.gz
Move time marker when clicking anywhere in timeline tracks
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 7576b33f..e6b773c9 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -682,6 +682,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
682 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span 682 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span
683 // This needs to move to a keyboard shortcut that is TBD 683 // This needs to move to a keyboard shortcut that is TBD
684 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 684 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
685
686 this.application.ninja.timeline.playheadmarker.style.left = ev.offsetX + "px";
687 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
688 var currentMillisec = currentMillisecPerPixel * ev.offsetX;
689 this.application.ninja.timeline.updateTimeText(currentMillisec);
690
685 if (ev.shiftKey) { 691 if (ev.shiftKey) {
686 if (this.tweens.length < 1) { 692 if (this.tweens.length < 1) {
687 this.insertTween(0); 693 this.insertTween(0);
@@ -1051,6 +1057,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
1051 // build the new keyframe string 1057 // build the new keyframe string
1052 var keyframeString = "@-webkit-keyframes " + this.animationName + " {"; 1058 var keyframeString = "@-webkit-keyframes " + this.animationName + " {";
1053 1059
1060 console.log(this.animationName);
1061
1054 for (var i = 0; i < this.tweens.length; i++) { 1062 for (var i = 0; i < this.tweens.length; i++) {
1055 var keyMill = parseInt(this.tweens[i].tweenData.keyFrameMillisec); 1063 var keyMill = parseInt(this.tweens[i].tweenData.keyFrameMillisec);
1056 // TODO - trackDur should be parseFloat rounded to significant digits 1064 // TODO - trackDur should be parseFloat rounded to significant digits