aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorKruti Shah2012-03-05 11:12:29 -0800
committerKruti Shah2012-03-05 11:12:29 -0800
commit59561ec3490c743aab73a17273177e5db7be253e (patch)
treeea7c6af53392e222915081b2e08e2fa6101e04fb /js/panels
parent395c4df4be16c663e6b51075441cbe0a826b2cd3 (diff)
parent6f1d1232e54d3d30b24abe0319dcfe5f4dc30f66 (diff)
downloadninja-59561ec3490c743aab73a17273177e5db7be253e.tar.gz
Merge branch 'refs/heads/TimelineUber' into Timeline-b4-latest
Diffstat (limited to 'js/panels')
-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 420be0c9..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;
@@ -540,7 +540,9 @@ 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");
545 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-transition-timing-function", "linear");
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;} }"; 546 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); 547 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule);
546 this.insertTween(tweenEvent.offsetX); 548 this.insertTween(tweenEvent.offsetX);