diff options
author | Jonathan Duran | 2012-03-08 11:04:59 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-03-08 11:04:59 -0800 |
commit | b4aa9a46bdf6ed748cbb3fc2a2a4fc226e0e7fd7 (patch) | |
tree | 017ce4f53375ec7dfec3b8389a13ebba585ba603 /js/panels/Timeline/TimelinePanel.reel | |
parent | abdd0542bce89b6b22f0684d00b9cf24e5d0a5e6 (diff) | |
download | ninja-b4aa9a46bdf6ed748cbb3fc2a2a4fc226e0e7fd7.tar.gz |
Remove unnecessary needsDraw calls
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 26 |
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 b12183f2..0185d448 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -276,6 +276,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
276 | this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false); | 276 | this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false); |
277 | this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false); | 277 | this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false); |
278 | this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false); | 278 | this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false); |
279 | this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false); | ||
280 | this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false); | ||
281 | this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false); | ||
279 | } | 282 | } |
280 | }, | 283 | }, |
281 | 284 | ||
@@ -410,6 +413,29 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
410 | } | 413 | } |
411 | }, | 414 | }, |
412 | 415 | ||
416 | startPlayheadTracking:{ | ||
417 | value:function(){ | ||
418 | this.time_markers.onmousemove = this.updatePlayhead.bind(this); | ||
419 | } | ||
420 | }, | ||
421 | |||
422 | stopPlayheadTracking:{ | ||
423 | value:function () { | ||
424 | this.time_markers.onmousemove = null; | ||
425 | } | ||
426 | }, | ||
427 | |||
428 | updatePlayhead:{ | ||
429 | value:function (event) { | ||
430 | var clickedPosition = event.target.offsetLeft + event.offsetX; | ||
431 | this.playhead.style.left = (clickedPosition - 2) + "px"; | ||
432 | this.playheadmarker.style.left = clickedPosition + "px"; | ||
433 | var currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80); | ||
434 | var currentMillisec = currentMillisecPerPixel * clickedPosition; | ||
435 | this.updateTimeText(currentMillisec); | ||
436 | } | ||
437 | }, | ||
438 | |||
413 | handleSelectionChange:{ | 439 | handleSelectionChange:{ |
414 | value:function(){ | 440 | value:function(){ |
415 | var key , switchSelectedLayer,layerIndex; | 441 | var key , switchSelectedLayer,layerIndex; |