diff options
author | Kruti Shah | 2012-06-26 13:10:50 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-26 13:10:50 -0700 |
commit | 0217858c93c54c9b65da4c4c52730a5221664ea8 (patch) | |
tree | 696ba23b6c66237eae5c98b0c3fee62909841708 /js/panels/Timeline/PropertyTrack.reel | |
parent | a2047a565aa5ef8643c5d71de3cc484191d6c671 (diff) | |
parent | d9170ea8ac54aa2aefd43de15defb439e65fa1f3 (diff) | |
download | ninja-0217858c93c54c9b65da4c4c52730a5221664ea8.tar.gz |
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel')
-rw-r--r-- | js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index c18d6eff..31ba8253 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | |||
@@ -442,12 +442,12 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
442 | 442 | ||
443 | for (var i = 0; i < this.propTweens.length; i++) { | 443 | for (var i = 0; i < this.propTweens.length; i++) { |
444 | var keyMill = parseInt(this.propTweens[i].tweenData.keyFrameMillisec); | 444 | var keyMill = parseInt(this.propTweens[i].tweenData.keyFrameMillisec); |
445 | // TODO - trackDur should be parseFloat rounded to significant digits | 445 | // trackDur should be parseFloat rounded to significant digits |
446 | var trackDur = parseInt(this.trackDuration); | 446 | var trackDur = parseInt(this.trackDuration); |
447 | var keyframePercent = Math.round((keyMill / trackDur) * 100) + "%"; | 447 | var keyframePercent = Math.round((keyMill / trackDur) * 100) + "%"; |
448 | var keyframePropertyString = " " + keyframePercent + " {"; | 448 | var keyframePropertyString = " " + keyframePercent + " {"; |
449 | for(var prop in this.propTweens[i].tweenData.tweenedProperties){ | 449 | for(var prop in this.propTweens[i].tweenData.tweenedProperties){ |
450 | keyframePropertyString += prop + ": " + this.propTweens[i].tweenData.tweenedProperties[prop]; | 450 | keyframePropertyString += prop + ": " + this.propTweens[i].tweenData.tweenedProperties[prop] + ";"; |
451 | } | 451 | } |
452 | keyframePropertyString += "}"; | 452 | keyframePropertyString += "}"; |
453 | keyframeString += keyframePropertyString; | 453 | keyframeString += keyframePropertyString; |
@@ -469,7 +469,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
469 | this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue; | 469 | this.propTweens[0].tweenData.tweenedProperties[this.trackEditorProperty] = currentStyleValue; |
470 | 470 | ||
471 | this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; | 471 | this.animationName = this.animatedElement.classList[0] + "_" + this.trackEditorProperty; |
472 | var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.animationNamesString; | 472 | var currentAnimationNameString = this.parentComponent.parentComponent.parentComponent.parentComponent.animationNamesString; |
473 | var newAnimationNames = currentAnimationNameString + "," + this.animationName; | 473 | var newAnimationNames = currentAnimationNameString + "," + this.animationName; |
474 | var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration"); | 474 | var currentAnimationDuration = this.ninjaStylesContoller.getElementStyle(this.animatedElement, "-webkit-animation-duration"); |
475 | var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration; | 475 | var newAnimationDuration = currentAnimationDuration + "," + currentAnimationDuration; |
@@ -479,8 +479,8 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
479 | this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames; | 479 | this.parentComponent.parentComponent.parentComponent.animationNamesString = newAnimationNames; |
480 | 480 | ||
481 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); | 481 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); |
482 | |||
483 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); | 482 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); |
483 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "forwards"); | ||
484 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); | 484 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); |
485 | 485 | ||
486 | var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} 100% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} }"; | 486 | var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} 100% {" + this.trackEditorProperty + ": " + currentStyleValue + ";} }"; |