aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 5ae59c4e..85ea7d2e 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -158,6 +158,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
158 return this._masterDuration; 158 return this._masterDuration;
159 }, 159 },
160 set:function (val) { 160 set:function (val) {
161 console.log('timelinepanel.masterDuration.set('+val+')');
162 //debugger;
161 this._masterDuration = val; 163 this._masterDuration = val;
162 this.timebar.style.width = (this._masterDuration / 12) + "px"; 164 this.timebar.style.width = (this._masterDuration / 12) + "px";
163 } 165 }
@@ -540,8 +542,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
540 this.drawTimeMarkers(); 542 this.drawTimeMarkers();
541 // Document switching 543 // Document switching
542 // Check to see if we have saved timeline information in the currentDocument. 544 // Check to see if we have saved timeline information in the currentDocument.
543
544
545 if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined" || this.application.ninja.breadCrumbClick) { 545 if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined" || this.application.ninja.breadCrumbClick) {
546 // No, we have no information stored. Create it. 546 // No, we have no information stored. Create it.
547 this.initTimelineCache(); 547 this.initTimelineCache();
@@ -556,6 +556,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
556 this._openDoc = true; 556 this._openDoc = true;
557 this.restoreLayer(parentNode.children[myIndex]); 557 this.restoreLayer(parentNode.children[myIndex]);
558 } 558 }
559 this.resetMasterDuration();
559 }else if (this.application.ninja.currentDocument.documentRoot.children[0]) { 560 }else if (this.application.ninja.currentDocument.documentRoot.children[0]) {
560 // Yes, it has DOM elements. Loop through them and create a new object for each. 561 // Yes, it has DOM elements. Loop through them and create a new object for each.
561 for (myIndex = 0; this.application.ninja.currentDocument.documentRoot.children[myIndex]; myIndex++) { 562 for (myIndex = 0; this.application.ninja.currentDocument.documentRoot.children[myIndex]; myIndex++) {
@@ -564,21 +565,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
564 } 565 }
565 } 566 }
566 // }else if(this.application.ninja.breadCrumbClick){ 567 // }else if(this.application.ninja.breadCrumbClick){
567 } else {
568
569 var parentNode = this.application.ninja.currentSelectedContainer;
570 for (myIndex = 0; parentNode.children[myIndex]; myIndex++) {
571 this._openDoc = true;
572 this.restoreLayer(parentNode.children[myIndex]);
573 }
574 } 568 }
575 569
576 // After recreating the tracks and layers, store the result in the currentDocument. 570 // After recreating the tracks and layers, store the result in the currentDocument.
577 /*
578 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers;
579 this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber;
580 this.application.ninja.currentDocument.tlCurrentSelectedContainer=this.application.ninja.currentSelectedContainer;
581 */
582 this.arrLayers = this.temparrLayers; 571 this.arrLayers = this.temparrLayers;
583 this.cacheTimeline(); 572 this.cacheTimeline();
584 573
@@ -770,7 +759,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
770 var ptrParent = nj.queryParentSelector(event.target, ".container-layer"); 759 var ptrParent = nj.queryParentSelector(event.target, ".container-layer");
771 if (ptrParent !== false) { 760 if (ptrParent !== false) {
772 var myIndex = this.getActiveLayerIndex(); 761 var myIndex = this.getActiveLayerIndex();
773 this.selectLayer(myIndex, true); 762 console.log('timelinePanel.timelineLeftPaneMousedown, myIndex = ' + myIndex)
763 if (myIndex !== false) {
764 this.selectLayer(myIndex, true);
765 }
766
774 } 767 }
775 this._isMousedown = true; 768 this._isMousedown = true;
776 } 769 }
@@ -1063,6 +1056,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1063 } 1056 }
1064 this._captureSelection = true; 1057 this._captureSelection = true;
1065 } 1058 }
1059 this.resetMasterDuration();
1066 } 1060 }
1067 }, 1061 },
1068 1062