diff options
author | Jonathan Duran | 2012-03-01 11:46:36 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-03-01 11:46:36 -0800 |
commit | 51206a5b16e299f7ec8291d899277f7e4c95bb25 (patch) | |
tree | 407da0cba5b138fe34b89f7c2182453bd6360f33 /js/panels | |
parent | 219f3a05e8a0fa994e301bb548d0d623c0208e81 (diff) | |
download | ninja-51206a5b16e299f7ec8291d899277f7e4c95bb25.tar.gz |
Set doc dirty flag when adding tweens or modifying animations
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 7 |
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 | ||