diff options
author | Jonathan Duran | 2012-02-28 08:33:44 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-02-28 08:33:44 -0800 |
commit | ad730e448c523b8c849cb1c9c63a30e8b62a2780 (patch) | |
tree | 549287f9bc43b2dd582f33ceb53f0524460a9097 /js/panels/Timeline | |
parent | 0031310ea80a33b1752d3813070b00215f0c52c6 (diff) | |
download | ninja-ad730e448c523b8c849cb1c9c63a30e8b62a2780.tar.gz |
Fix re-reopened animation duration and milliseconds
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 55c84dce..d369106c 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -553,7 +553,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
553 | var keyframeString = "@-webkit-keyframes " + this.animationName + " {"; | 553 | var keyframeString = "@-webkit-keyframes " + this.animationName + " {"; |
554 | 554 | ||
555 | for (var i = 0; i < this.tweens.length; i++) { | 555 | for (var i = 0; i < this.tweens.length; i++) { |
556 | var keyframePercent = Math.round((this.tweens[i].keyFrameMillisec / this.trackDuration) * 100) + "%"; | 556 | var keyMill = parseInt(this.tweens[i].keyFrameMillisec); |
557 | var trackDur = parseFloat(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;"; |