diff options
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 12 |
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); |