aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
authorJon Reid2012-02-27 12:08:17 -0800
committerJon Reid2012-02-27 12:08:17 -0800
commitd55224f36da55e26c266a02efa6e58d4ecf1253e (patch)
tree36faa8ff93c0f7b925f5c0a7fb85b5d209da1f8e /js/panels/Timeline/TimelinePanel.reel
parentec5f81c6c0ccf865505ab82ebf9240c667f05c91 (diff)
parentcf9e9b711ba3d77a2a0888f8ab763383f53a1619 (diff)
downloadninja-d55224f36da55e26c266a02efa6e58d4ecf1253e.tar.gz
Merge remote-tracking branch 'ninja-jduran/Timeline' into Timeline-local
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html2
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js33
2 files changed, 24 insertions, 11 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 65d2fa7b..1aa9a725 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -300,7 +300,7 @@
300 </div> 300 </div>
301 </div> 301 </div>
302 302
303 <div id="layer_resizer" class="layerresizer"></div> 303 <div data-montage-id="layer_resizer" class="layerresizer"></div>
304 304
305 <div id="timeline_rightpane" class="tl_rightpane"> 305 <div id="timeline_rightpane" class="tl_rightpane">
306 <div id="right_inside" class="rightinside"> 306 <div id="right_inside" class="rightinside">
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 9519730e..d7ce7079 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -228,15 +228,19 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
228 228
229 this._hashKey = "123"; 229 this._hashKey = "123";
230 _firstLayerDraw = false; 230 _firstLayerDraw = false;
231 if(this.application.ninja.currentDocument.documentRoot.children[0]){ 231 if(!this.application.ninja.documentController.creatingNewFile){
232 myIndex=0; 232 if(this.application.ninja.currentDocument.documentRoot.children[0]){
233 while(this.application.ninja.currentDocument.documentRoot.children[myIndex]) 233 myIndex=0;
234 { 234 while(this.application.ninja.currentDocument.documentRoot.children[myIndex])
235 this._openDoc=true; 235 {
236 NJevent('newLayer',{key:this._hashKey,ele:this.application.ninja.currentDocument.documentRoot.children[myIndex]}) 236 this._openDoc=true;
237// this.selectLayer(myIndex); 237 NJevent('newLayer',{key:this._hashKey,ele:this.application.ninja.currentDocument.documentRoot.children[myIndex]})
238// TimelineTrack.retrieveStoredTweens(); 238 myIndex++;
239 myIndex++; 239 }
240 }
241 else{
242 NJevent('newLayer', this._hashKey);
243 this.selectLayer(0);
240 } 244 }
241 }else{ 245 }else{
242 NJevent('newLayer', this._hashKey); 246 NJevent('newLayer', this._hashKey);
@@ -488,6 +492,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
488 thingToPush.elementsList = []; 492 thingToPush.elementsList = [];
489 thingToPush.deleted = false; 493 thingToPush.deleted = false;
490 thingToPush.isSelected = false; 494 thingToPush.isSelected = false;
495 thingToPush.created=false;
491 if (_firstLayerDraw) { 496 if (_firstLayerDraw) {
492 497
493 this.application.ninja.currentSelectedContainer.uuid=this._hashKey; 498 this.application.ninja.currentSelectedContainer.uuid=this._hashKey;
@@ -498,7 +503,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
498 if(this._openDoc){ 503 if(this._openDoc){
499 event.detail.ele.uuid =nj.generateRandom(); 504 event.detail.ele.uuid =nj.generateRandom();
500 thingToPush.elementsList.push(event.detail.ele); 505 thingToPush.elementsList.push(event.detail.ele);
501 this._openDoc=false;
502 } 506 }
503 507
504 newTrack.trackID = this.currentLayerNumber; 508 newTrack.trackID = this.currentLayerNumber;
@@ -544,6 +548,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
544 this.selectLayer(0); 548 this.selectLayer(0);
545 549
546 } 550 }
551
552 if(this._openDoc){
553 this.hashElementMapToLayer.setItem(event.detail.ele.uuid, event.detail.ele,this.currentLayerSelected);
554 this._openDoc=false;
555 }
547 this._LayerUndoObject = thingToPush; 556 this._LayerUndoObject = thingToPush;
548 this._LayerUndoIndex = thingToPush.layerID; 557 this._LayerUndoIndex = thingToPush.layerID;
549 this._LayerUndoStatus = true; 558 this._LayerUndoStatus = true;
@@ -873,6 +882,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
873 this.trackRepetition.selectedIndexes = [layerIndex]; 882 this.trackRepetition.selectedIndexes = [layerIndex];
874 this.currentLayerSelected = this.arrLayers[layerIndex]; 883 this.currentLayerSelected = this.arrLayers[layerIndex];
875 this.currentTrackSelected = this.arrTracks[layerIndex]; 884 this.currentTrackSelected = this.arrTracks[layerIndex];
885 if(this._captureSelection){
886 this.application.ninja.selectionController.selectElements(this.currentLayerSelected.elementsList)
887 }
888 this._captureSelection = true;
876 } else { 889 } else {
877 this.layerRepetition.selectedIndexes = null; 890 this.layerRepetition.selectedIndexes = null;
878 this.trackRepetition.selectedIndexes = null; 891 this.trackRepetition.selectedIndexes = null;