From 80e4203dd97866da3cf03b28b1b65c8153274e18 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Thu, 23 Feb 2012 11:06:10 -0800 Subject: New Doc Signed-off-by: Kruti Shah Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 1d9419c6..8eb2b745 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -201,6 +201,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { /* === BEGIN: Controllers === */ initTimelineView:{ value:function () { + var myIndex; this.layout_tracks = this.element.querySelector(".layout-tracks"); this.layout_markers = this.element.querySelector(".layout_markers"); @@ -217,7 +218,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this._hashKey = "123"; _firstLayerDraw = false; - NJevent('newLayer', this._hashKey); + if(this.application.ninja.currentDocument.documentRoot.children[0]){ + myIndex=0; + while(this.application.ninja.currentDocument.documentRoot.children[myIndex]) + { + this.application.ninja.currentDocument.documentRoot.children[myIndex]; + NJevent('newLayer',{key:this._hashKey,element:this.application.ninja.currentDocument.documentRoot.children[myIndex]}); + myIndex++; + } + }else{ + NJevent('newLayer', this._hashKey); + } _firstLayerDraw = true; this.selectLayer(0); } -- cgit v1.2.3