diff options
author | Jonathan Duran | 2012-03-02 11:09:04 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-03-02 11:09:04 -0800 |
commit | f7594082c808276306342a9a44c0b55de3be5c03 (patch) | |
tree | e58e908e812d2baf7cd58828c8f46853c8457f1c /js/panels | |
parent | 395c4df4be16c663e6b51075441cbe0a826b2cd3 (diff) | |
download | ninja-f7594082c808276306342a9a44c0b55de3be5c03.tar.gz |
Timeline: Fix for animation iteration count
Add default webkit css properties to allow animations with integer iteration counts.
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 420be0c9..cc1dac5d 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -540,7 +540,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
540 | this.animationName = "animation_" + this.animatedElement.classList[0]; | 540 | this.animationName = "animation_" + this.animatedElement.classList[0]; |
541 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); | 541 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); |
542 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); | 542 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); |
543 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", "infinite"); | 543 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", 1); |
544 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "both"); | ||
544 | var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} 100% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} }"; | 545 | var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} 100% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} }"; |
545 | this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); | 546 | this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); |
546 | this.insertTween(tweenEvent.offsetX); | 547 | this.insertTween(tweenEvent.offsetX); |