From 844d59d85a1881525c79a1f44a35a9ea59e70e4a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:02:22 -0700 Subject: removing the serializable from the timeline repetition and fixing the panels currentDocument binding Signed-off-by: Valerio Virgillito --- js/panels/Panel.reel/Panel.js | 4 ++-- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index fde5c962..15eb4da9 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js @@ -122,8 +122,8 @@ exports.Panel = Montage.create(Component, { this._currentDocument = value; - if(typeof this.panelContent.content[0].controller._currentDocument !== "undefined") { - this.panelContent.content[0].controller.currentDocument = this._currentDocument; + if(typeof this.panelContent.content._element.controller._currentDocument !== "undefined") { + this.panelContent.content._element.controller.currentDocument = this._currentDocument; } if(!value) { diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 658ac043..36b868d0 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,8 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, - serializable: true + }, }, // Set to false to skip array caching array sets in current document @@ -346,8 +345,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - }, - serializable: true + } }, _selectedKeyframes:{ @@ -603,11 +601,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; + this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; + this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; + this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, -- cgit v1.2.3