From 0a5ce26ee62b74261e1b00877b7e43af0e681856 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 12 Jun 2012 10:10:11 -0700 Subject: Timeline: Fix document switching under Montage v.10 --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 28 +++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'js/panels/Timeline/TimelineTrack.reel') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 7cfe07a6..75997466 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -155,7 +155,11 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, set: function(newVal) { this._arrPositionTracks = newVal; - this.trackData.arrPositionTracks = newVal; + if (typeof(this.trackData) === "undefined") { + //this.createTrackData(); + } + this.trackData.arrPositionTracks = newVal; + } }, _positionTracksRepetition: { @@ -348,6 +352,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }, trackData:{ + serializable: true, get:function(){ return this._trackData; }, @@ -386,6 +391,27 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.needsDraw = true; } }, + createTrackData: { + value: function() { + tempData = {}; + tempData.bypassAnimation = this.bypassAnimation; + tempData.trackID = this.layerID; + tempData.tweens = this.tweens; + tempData.animatedElement = this.animatedElement; + tempData.arrStyleTracks = this.arrStyleTracks; + tempData.isTrackAnimated = this.isTrackAnimated; + tempData.trackDuration = this.trackDuration; + tempData.animationName = this.animationName; + tempData.currentKeyframeRule = this.currentKeyframeRule; + tempData.isMainCollapsed = this.isMainCollapsed; + tempData.isPositionCollapsed = this.isPositionCollapsed; + tempData.isTransformCollapsed = this.isTransformCollapsed; + tempData.isStyleCollapsed = this.isStyleCollapsed; + tempData.trackPosition = this.trackPosition; + tempData.isVisible = this.isVisible; + this.trackData = tempData; + } + }, // Data binding observation point and trigger method _bindingPoint : { -- cgit v1.2.3