aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJon Reid2012-05-03 16:47:18 -0700
committerJon Reid2012-05-03 16:47:18 -0700
commitd582eb28c04eb8e1f1fa7a729ee20f2e7a0fb935 (patch)
tree0507a7b0f59b66b4d2959696271429a6eb6831d0 /js
parent73c4f7f449ba58e70f7335ef932b23dd450c925b (diff)
downloadninja-d582eb28c04eb8e1f1fa7a729ee20f2e7a0fb935.tar.gz
Timeline: Bug fix: Master Duration not updating when all documents are
closed.
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 80baffc8..cbd89b47 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -177,7 +177,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
177 }, 177 },
178 set:function (val) { 178 set:function (val) {
179 this._masterDuration = val; 179 this._masterDuration = val;
180 this.timebar.style.width = (this._masterDuration / 12) + "px"; 180 var intDur = Math.round(val/12),
181 strWidth = intDur + "px";
182 this.timebar.style.width = strWidth;
181 } 183 }
182 }, 184 },
183 185
@@ -515,8 +517,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
515 "deleteLayer", 517 "deleteLayer",
516 "elementAdded", 518 "elementAdded",
517 "elementsRemoved", 519 "elementsRemoved",
518 "elementReplaced", 520 "elementReplaced"],
519 "selectionChange"], 521 //"selectionChange"],
520 i, 522 i,
521 arrEventsLength = arrEvents.length; 523 arrEventsLength = arrEvents.length;
522 524
@@ -690,12 +692,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
690 this._openDoc = false; 692 this._openDoc = false;
691 this.end_hottext.value = 25; 693 this.end_hottext.value = 25;
692 this.updateTrackContainerWidth(); 694 this.updateTrackContainerWidth();
693 this.masterDuration = 0;
694 // Clear the repetitions 695 // Clear the repetitions
695 if (this.arrLayers.length > 0) { 696 if (this.arrLayers.length > 0) {
696 this.arrLayers = []; 697 this.arrLayers = [];
697 this.arrLayers.length = 0; 698 this.arrLayers.length = 0;
698 } 699 }
700 this.resetMasterDuration();
699 } 701 }
700 }, 702 },
701 703