aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 1edc04ba..88c78411 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -408,16 +408,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
408 408
409 insertTween:{ 409 insertTween:{
410 value:function (clickPos) { 410 value:function (clickPos) {
411
412 // calculate new tween's keyframe milliseconds by clickPos 411 // calculate new tween's keyframe milliseconds by clickPos
413 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); 412 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
414 var currentMillisec = currentMillisecPerPixel * clickPos; 413 var currentMillisec = currentMillisecPerPixel * clickPos;
415 414
416 // need to check timeline master duration if greater than this track duration 415 // need to check timeline master duration if greater than this track duration
417 this.trackDuration = currentMillisec; 416 this.trackDuration = currentMillisec;
418
419
420
421 var newTween = {}; 417 var newTween = {};
422 418
423 if (clickPos == 0) { 419 if (clickPos == 0) {
@@ -445,9 +441,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
445 // update the animation duration 441 // update the animation duration
446 var animationDuration = Math.round(this.trackDuration / 1000) + "s"; 442 var animationDuration = Math.round(this.trackDuration / 1000) + "s";
447 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); 443 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration);
448
449 this.nextKeyframe += 1; 444 this.nextKeyframe += 1;
450 } 445 }
446 this.application.ninja.documentController.activeDocument.needsSave = true;
451 } 447 }
452 }, 448 },
453 449
@@ -564,6 +560,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
564 keyframeString += " }"; 560 keyframeString += " }";
565 // set the keyframe string as the new rule 561 // set the keyframe string as the new rule
566 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString); 562 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString);
563 this.application.ninja.documentController.activeDocument.needsSave = true;
567 } 564 }
568 }, 565 },
569 566