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.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 43e758f4..8764d041 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -157,6 +157,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
157 value:false, 157 value:false,
158 writable:true 158 writable:true
159 }, 159 },
160 timeMarkerHolder:{
161 value: null
162 },
160 /* === END: Models === */ 163 /* === END: Models === */
161 164
162 /* === BEGIN: Draw cycle === */ 165 /* === BEGIN: Draw cycle === */
@@ -202,6 +205,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
202 this.timeline_leftpane.addEventListener("click", this.timelineLeftPaneClick.bind(this), false); 205 this.timeline_leftpane.addEventListener("click", this.timelineLeftPaneClick.bind(this), false);
203 this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false); 206 this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false);
204 this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false); 207 this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false);
208 this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false);
205 209
206 this.drawTimeMarkers(); 210 this.drawTimeMarkers();
207 211
@@ -213,6 +217,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
213 } 217 }
214 }, 218 },
215 219
220 updateTrackContainerWidth:{
221 value: function(){
222 this.container_tracks.style.width = (this.end_hottext.value * 80) + "px";
223 this.master_track.style.width = (this.end_hottext.value * 80) + "px";
224 this.time_markers.style.width = (this.end_hottext.value * 80) + "px";
225 this.time_markers.removeChild(this.timeMarkerHolder);
226 this.drawTimeMarkers();
227 }
228 },
229
216 updateLayerScroll:{ 230 updateLayerScroll:{
217 value:function () { 231 value:function () {
218 this.user_layers.scrollTop = this.layout_tracks.scrollTop; 232 this.user_layers.scrollTop = this.layout_tracks.scrollTop;
@@ -602,6 +616,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
602 616
603 drawTimeMarkers:{ 617 drawTimeMarkers:{
604 value:function () { 618 value:function () {
619 this.timeMarkerHolder = document.createElement("div");
620 this.time_markers.appendChild(this.timeMarkerHolder);
605 var i; 621 var i;
606 var totalMarkers = Math.floor(this.time_markers.offsetWidth / 80); 622 var totalMarkers = Math.floor(this.time_markers.offsetWidth / 80);
607 for (i = 0; i < totalMarkers; i++) { 623 for (i = 0; i < totalMarkers; i++) {
@@ -609,7 +625,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
609 var markValue = this.calculateTimeMarkerValue(i); 625 var markValue = this.calculateTimeMarkerValue(i);
610 timeMark.className = "timemark"; 626 timeMark.className = "timemark";
611 timeMark.innerHTML = markValue; 627 timeMark.innerHTML = markValue;
612 this.time_markers.appendChild(timeMark); 628 this.timeMarkerHolder.appendChild(timeMark);
613 } 629 }
614 } 630 }
615 }, 631 },