aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 55c84dce..43cd7477 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -377,7 +377,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
377 // This needs to move to a keyboard shortcut that is TBD 377 // This needs to move to a keyboard shortcut that is TBD
378 378
379 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 379 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
380 //this.application.ninja.timeline.selectLayer(selectIndex);
381 380
382 if (ev.shiftKey) { 381 if (ev.shiftKey) {
383 if (this.application.ninja.timeline.arrLayers[selectedIndex].elementsList.length == 1) { 382 if (this.application.ninja.timeline.arrLayers[selectedIndex].elementsList.length == 1) {
@@ -533,7 +532,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
533 this.tweens[0].tweenedProperties["top"] = this.animatedElement.offsetTop; 532 this.tweens[0].tweenedProperties["top"] = this.animatedElement.offsetTop;
534 this.tweens[0].tweenedProperties["left"] = this.animatedElement.offsetLeft; 533 this.tweens[0].tweenedProperties["left"] = this.animatedElement.offsetLeft;
535 var animationDuration = Math.round(this.trackDuration / 1000) + "s"; 534 var animationDuration = Math.round(this.trackDuration / 1000) + "s";
536 this.animationName = "animation_" + this.animatedElement.className; 535 this.animationName = "animation_" + this.animatedElement.classList[0];
537 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); 536 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName);
538 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); 537 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration);
539 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", "infinite"); 538 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", "infinite");
@@ -553,7 +552,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
553 var keyframeString = "@-webkit-keyframes " + this.animationName + " {"; 552 var keyframeString = "@-webkit-keyframes " + this.animationName + " {";
554 553
555 for (var i = 0; i < this.tweens.length; i++) { 554 for (var i = 0; i < this.tweens.length; i++) {
556 var keyframePercent = Math.round((this.tweens[i].keyFrameMillisec / this.trackDuration) * 100) + "%"; 555 var keyMill = parseInt(this.tweens[i].keyFrameMillisec);
556 // TODO - trackDur should be parseFloat rounded to significant digits
557 var trackDur = parseInt(this.trackDuration);
558 var keyframePercent = Math.round((keyMill / trackDur) * 100) + "%";
557 var keyframePropertyString = " " + keyframePercent + " {"; 559 var keyframePropertyString = " " + keyframePercent + " {";
558 keyframePropertyString += "top: " + this.tweens[i].tweenedProperties["top"] + "px;"; 560 keyframePropertyString += "top: " + this.tweens[i].tweenedProperties["top"] + "px;";
559 keyframePropertyString += " left: " + this.tweens[i].tweenedProperties["left"] + "px;"; 561 keyframePropertyString += " left: " + this.tweens[i].tweenedProperties["left"] + "px;";