aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Reid2012-03-02 18:19:01 -0800
committerJon Reid2012-03-02 18:19:01 -0800
commitfa8b81d4f436c0b8564c8dcdd22d8dd6d5bccfaa (patch)
tree59bcc324f8ea0fa1659c7246c0d015006f251078
parent5689e3e2deda1b1f7ba32f6007ddab20f6c1fe64 (diff)
parent6f1d1232e54d3d30b24abe0319dcfe5f4dc30f66 (diff)
downloadninja-fa8b81d4f436c0b8564c8dcdd22d8dd6d5bccfaa.tar.gz
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-serialized
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 6e753b9f..92714c07 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -451,7 +451,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
451 this.tweens.push(newTween); 451 this.tweens.push(newTween);
452 452
453 // update the animation duration 453 // update the animation duration
454 var animationDuration = Math.round(this.trackDuration / 1000) + "s"; 454 var animationDuration = (this.trackDuration / 1000) + "s";
455 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); 455 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration);
456 this.nextKeyframe += 1; 456 this.nextKeyframe += 1;
457 } 457 }
@@ -468,7 +468,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
468 retrieveStoredTweens:{ 468 retrieveStoredTweens:{
469 value:function () { 469 value:function () {
470 var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute; 470 var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute;
471 var currentMilliSec,currentMilliSecPerPixel,clickPosition,tempTiming,tempTimingInt,trackTiming,i = 0; 471 var currentMilliSec,currentMilliSecPerPixel,clickPosition,tempTiming,tempTimingFloat,trackTiming,i = 0;
472 472
473 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 473 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
474 this.application.ninja.timeline.arrLayers[selectedIndex].created=true; 474 this.application.ninja.timeline.arrLayers[selectedIndex].created=true;
@@ -504,8 +504,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
504 } 504 }
505 else { 505 else {
506 tempTiming = trackTiming.split("s"); 506 tempTiming = trackTiming.split("s");
507 tempTimingInt = parseInt(tempTiming[0]); 507 tempTimingFloat = parseFloat(tempTiming[0]);
508 this.trackDuration = tempTimingInt *1000; 508 this.trackDuration = tempTimingFloat *1000;
509 percentValue = this.currentKeyframeRule[i].keyText; 509 percentValue = this.currentKeyframeRule[i].keyText;
510 splitValue = percentValue.split("%"); 510 splitValue = percentValue.split("%");
511 fraction = splitValue[0] / 100; 511 fraction = splitValue[0] / 100;
@@ -538,7 +538,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
538 this.animationName = "animation_" + this.animatedElement.classList[0]; 538 this.animationName = "animation_" + this.animatedElement.classList[0];
539 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); 539 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName);
540 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); 540 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration);
541 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", "infinite"); 541 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", 1);
542 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "both");
543 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-transition-timing-function", "linear");
542 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;} }"; 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;} }";
543 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); 545 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule);
544 this.insertTween(tweenEvent.offsetX); 546 this.insertTween(tweenEvent.offsetX);