diff options
author | Jonathan Duran | 2012-03-02 14:55:26 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-03-02 14:55:26 -0800 |
commit | 6f1d1232e54d3d30b24abe0319dcfe5f4dc30f66 (patch) | |
tree | ea7c6af53392e222915081b2e08e2fa6101e04fb | |
parent | 239bb2d2a690ca24296749e7d0c2daa6fc4633f4 (diff) | |
download | ninja-6f1d1232e54d3d30b24abe0319dcfe5f4dc30f66.tar.gz |
Support writing and reading of animation duration with millseconds
Removed math rounding so that animation durations won't round to full seconds anymore.
Signed-off-by: Jonathan Duran <jduran@motorola.com>
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 051d56c2..7120298c 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -453,7 +453,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
453 | this.tweens.push(newTween); | 453 | this.tweens.push(newTween); |
454 | 454 | ||
455 | // update the animation duration | 455 | // update the animation duration |
456 | var animationDuration = Math.round(this.trackDuration / 1000) + "s"; | 456 | var animationDuration = (this.trackDuration / 1000) + "s"; |
457 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); | 457 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); |
458 | this.nextKeyframe += 1; | 458 | this.nextKeyframe += 1; |
459 | } | 459 | } |
@@ -470,7 +470,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
470 | retrieveStoredTweens:{ | 470 | retrieveStoredTweens:{ |
471 | value:function () { | 471 | value:function () { |
472 | var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute; | 472 | var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute; |
473 | var currentMilliSec,currentMilliSecPerPixel,clickPosition,tempTiming,tempTimingInt,trackTiming,i = 0; | 473 | var currentMilliSec,currentMilliSecPerPixel,clickPosition,tempTiming,tempTimingFloat,trackTiming,i = 0; |
474 | 474 | ||
475 | var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); | 475 | var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); |
476 | this.application.ninja.timeline.arrLayers[selectedIndex].created=true; | 476 | this.application.ninja.timeline.arrLayers[selectedIndex].created=true; |
@@ -506,8 +506,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
506 | } | 506 | } |
507 | else { | 507 | else { |
508 | tempTiming = trackTiming.split("s"); | 508 | tempTiming = trackTiming.split("s"); |
509 | tempTimingInt = parseInt(tempTiming[0]); | 509 | tempTimingFloat = parseFloat(tempTiming[0]); |
510 | this.trackDuration = tempTimingInt *1000; | 510 | this.trackDuration = tempTimingFloat *1000; |
511 | percentValue = this.currentKeyframeRule[i].keyText; | 511 | percentValue = this.currentKeyframeRule[i].keyText; |
512 | splitValue = percentValue.split("%"); | 512 | splitValue = percentValue.split("%"); |
513 | fraction = splitValue[0] / 100; | 513 | fraction = splitValue[0] / 100; |