aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
authorJon Reid2012-03-08 11:18:46 -0800
committerJon Reid2012-03-08 11:18:46 -0800
commitb35467e08f50f07f0fd556e17618ad331d35637b (patch)
tree0ae47d17bc46a6650d04870de705bd91f27dc12b /js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
parentde3b2f1dce91b8bf807e1b9264dbeb835d0c3006 (diff)
parentb4aa9a46bdf6ed748cbb3fc2a2a4fc226e0e7fd7 (diff)
downloadninja-b35467e08f50f07f0fd556e17618ad331d35637b.tar.gz
Merge remote-tracking branch 'ninja-jduran/SerialKiller' into Timeline-local
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-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;