aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
authorJonathan Duran2012-03-02 11:09:04 -0800
committerJonathan Duran2012-03-02 11:09:04 -0800
commitf7594082c808276306342a9a44c0b55de3be5c03 (patch)
treee58e908e812d2baf7cd58828c8f46853c8457f1c /js/panels/Timeline
parent395c4df4be16c663e6b51075441cbe0a826b2cd3 (diff)
downloadninja-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/Timeline')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js3
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);