aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index a2f19b28..92c0766b 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -26,7 +26,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
26 return this._arrLayers; 26 return this._arrLayers;
27 }, 27 },
28 set:function (newVal) { 28 set:function (newVal) {
29// debugger;
30 this._arrLayers = newVal; 29 this._arrLayers = newVal;
31 this.needsDraw = true; 30 this.needsDraw = true;
32 this.cacheTimeline(); 31 this.cacheTimeline();
@@ -113,8 +112,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
113 var selectIndex = this.getLayerIndexByID(newVal); 112 var selectIndex = this.getLayerIndexByID(newVal);
114 this._selectedLayerID = newVal; 113 this._selectedLayerID = newVal;
115 this._captureSelection = true; 114 this._captureSelection = true;
116 //console.log(selectIndex);
117 //debugger;
118 this.selectLayer(selectIndex, true); 115 this.selectLayer(selectIndex, true);
119 } 116 }
120 } 117 }
@@ -386,10 +383,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
386 returnObj.layerData.tweens = []; 383 returnObj.layerData.tweens = [];
387 returnObj.layerData.layerTag = ""; 384 returnObj.layerData.layerTag = "";
388 returnObj.layerData.isVisible = true; 385 returnObj.layerData.isVisible = true;
386 returnObj.layerData.docUUID = this.application.ninja.currentDocument._uuid;
389 returnObj.layerData.isTrackAnimated = false; 387 returnObj.layerData.isTrackAnimated = false;
390 returnObj.parentElementUUID = null; 388 returnObj.parentElementUUID = null;
391 returnObj.parentElement = null; 389 returnObj.parentElement = null;
392 returnObj.docUUID = this.application.ninja.currentDocument._uuid;
393 390
394 return returnObj; 391 return returnObj;
395 } 392 }
@@ -525,6 +522,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
525 this.drawTimeMarkers(); 522 this.drawTimeMarkers();
526 // Document switching 523 // Document switching
527 // Check to see if we have saved timeline information in the currentDocument. 524 // Check to see if we have saved timeline information in the currentDocument.
525 //debugger;
528 if ((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") && 526 if ((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") &&
529 (!this.application.ninja.currentDocument.breadCrumbClick)) { 527 (!this.application.ninja.currentDocument.breadCrumbClick)) {
530 //console.log('TimelinePanel.initTimelineForDocument: new Document'); 528 //console.log('TimelinePanel.initTimelineForDocument: new Document');
@@ -581,7 +579,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
581 579
582 // We're reading from the cache, not writing to it. 580 // We're reading from the cache, not writing to it.
583 this._boolCacheArrays = false; 581 this._boolCacheArrays = false;
584
585 for (i = 0; i < tlArrLayersLength; i++) { 582 for (i = 0; i < tlArrLayersLength; i++) {
586 if (this.application.ninja.currentDocument.tlArrLayers[i].layerData.isSelected === true) { 583 if (this.application.ninja.currentDocument.tlArrLayers[i].layerData.isSelected === true) {
587 this.application.ninja.currentDocument.tlArrLayers[i].layerData._isFirstDraw = true; 584 this.application.ninja.currentDocument.tlArrLayers[i].layerData._isFirstDraw = true;
@@ -675,11 +672,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
675 672
676 handleBreadCrumbBinding:{ 673 handleBreadCrumbBinding:{
677 value:function(event){ 674 value:function(event){
675 // Might fire if currentDocument has not yet been initialized.
678 if (this.application.ninja.currentDocument == null) { 676 if (this.application.ninja.currentDocument == null) {
679 return; 677 return;
680 } 678 }
681 if((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined")) 679 // Might fire if currentDocument is initialized but cache has not been initialized
682 return; 680 if(typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") {
681 return;
682 }
683
684 // If the breadCrumb has been clicked, we need to change documents.
683 if(this.application.ninja.currentDocument.breadCrumbClick){ 685 if(this.application.ninja.currentDocument.breadCrumbClick){
684 this.handleDocumentChange(event); 686 this.handleDocumentChange(event);
685 } 687 }
@@ -1040,7 +1042,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1040 1042
1041 this.layerRepetition.selectedIndexes = [layerIndex]; 1043 this.layerRepetition.selectedIndexes = [layerIndex];
1042 this.currentLayerSelected = this.arrLayers[layerIndex]; 1044 this.currentLayerSelected = this.arrLayers[layerIndex];
1043
1044 if (userSelection) { 1045 if (userSelection) {
1045 if (this._captureSelection) { 1046 if (this._captureSelection) {
1046 1047