aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index dfc40c0a..cd7622b1 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -277,6 +277,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
277 this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false); 277 this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false);
278 this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false); 278 this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false);
279 this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false); 279 this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false);
280 this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false);
281 this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false);
282 this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false);
280 } 283 }
281 }, 284 },
282 285
@@ -398,6 +401,29 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
398 } 401 }
399 }, 402 },
400 403
404 startPlayheadTracking:{
405 value:function(){
406 this.time_markers.onmousemove = this.updatePlayhead.bind(this);
407 }
408 },
409
410 stopPlayheadTracking:{
411 value:function () {
412 this.time_markers.onmousemove = null;
413 }
414 },
415
416 updatePlayhead:{
417 value:function (event) {
418 var clickedPosition = event.target.offsetLeft + event.offsetX;
419 this.playhead.style.left = (clickedPosition - 2) + "px";
420 this.playheadmarker.style.left = clickedPosition + "px";
421 var currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80);
422 var currentMillisec = currentMillisecPerPixel * clickedPosition;
423 this.updateTimeText(currentMillisec);
424 }
425 },
426
401 handleSelectionChange:{ 427 handleSelectionChange:{
402 value:function(){ 428 value:function(){
403 var key , switchSelectedLayer,layerIndex; 429 var key , switchSelectedLayer,layerIndex;