From 219f3a05e8a0fa994e301bb548d0d623c0208e81 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Thu, 1 Mar 2012 11:00:18 -0800 Subject: Update master track on duration change instead of tween add. Adds support for updating the master track duration on file open as well as when adding tweens to already opened files. Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/panels/Timeline') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 8f867d35..1edc04ba 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -229,6 +229,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, set:function (val) { this._trackDuration = val; + if(this._trackDuration > this.application.ninja.timeline.masterDuration){ + this.application.ninja.timeline.masterDuration = this._trackDuration; + } } }, @@ -413,9 +416,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { // need to check timeline master duration if greater than this track duration this.trackDuration = currentMillisec; - if(this.trackDuration > this.application.ninja.timeline.masterDuration){ - this.application.ninja.timeline.masterDuration = this.trackDuration; - } + var newTween = {}; -- cgit v1.2.3