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 --- js/panels/Timeline/Layer.reel/Layer.js | 1 + .../Timeline/TimelinePanel.reel/TimelinePanel.js | 3 +++ .../Timeline/TimelineTrack.reel/TimelineTrack.js | 28 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index ed0200ae..6b64261e 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -456,6 +456,7 @@ var Layer = exports.Layer = Montage.create(Component, { }, layerData:{ + serializable: true, get:function(){ return this._layerData; }, diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 36b868d0..65476d6b 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -783,6 +783,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var i = 0, tlArrLayersLength = this.application.ninja.currentDocument.tlArrLayers.length; + + this._ignoreNextContainerChange = true; + // We're reading from the cache, not writing to it. this._boolCacheArrays = false; for (i = 0; i < tlArrLayersLength; i++) { 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