diff options
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 13 |
1 files changed, 12 insertions, 1 deletions
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, { | |||
201 | /* === BEGIN: Controllers === */ | 201 | /* === BEGIN: Controllers === */ |
202 | initTimelineView:{ | 202 | initTimelineView:{ |
203 | value:function () { | 203 | value:function () { |
204 | var myIndex; | ||
204 | this.layout_tracks = this.element.querySelector(".layout-tracks"); | 205 | this.layout_tracks = this.element.querySelector(".layout-tracks"); |
205 | this.layout_markers = this.element.querySelector(".layout_markers"); | 206 | this.layout_markers = this.element.querySelector(".layout_markers"); |
206 | 207 | ||
@@ -217,7 +218,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
217 | 218 | ||
218 | this._hashKey = "123"; | 219 | this._hashKey = "123"; |
219 | _firstLayerDraw = false; | 220 | _firstLayerDraw = false; |
220 | NJevent('newLayer', this._hashKey); | 221 | if(this.application.ninja.currentDocument.documentRoot.children[0]){ |
222 | myIndex=0; | ||
223 | while(this.application.ninja.currentDocument.documentRoot.children[myIndex]) | ||
224 | { | ||
225 | this.application.ninja.currentDocument.documentRoot.children[myIndex]; | ||
226 | NJevent('newLayer',{key:this._hashKey,element:this.application.ninja.currentDocument.documentRoot.children[myIndex]}); | ||
227 | myIndex++; | ||
228 | } | ||
229 | }else{ | ||
230 | NJevent('newLayer', this._hashKey); | ||
231 | } | ||
221 | _firstLayerDraw = true; | 232 | _firstLayerDraw = true; |
222 | this.selectLayer(0); | 233 | this.selectLayer(0); |
223 | } | 234 | } |