aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js44
1 files changed, 1 insertions, 43 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 2581df0f..5fff33d9 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -506,7 +506,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
506 this.init(); 506 this.init();
507 this.ninjaStylesContoller = this.application.ninja.stylesController; 507 this.ninjaStylesContoller = this.application.ninja.stylesController;
508 this.element.addEventListener("click", this, false); 508 this.element.addEventListener("click", this, false);
509 this.eventManager.addEventListener("tlZoomSlider", this, false); 509
510 510
511 // Drag and Drop event handlers 511 // Drag and Drop event handlers
512 this.element.addEventListener("dragstart", this.handleKeyframeDragstart.bind(this), false); 512 this.element.addEventListener("dragstart", this.handleKeyframeDragstart.bind(this), false);
@@ -593,48 +593,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
593 // ==== End Draw cycle methods 593 // ==== End Draw cycle methods
594 594
595 // ==== Begin Event handlers 595 // ==== Begin Event handlers
596 handleTlZoomSlider: {
597 value: function(event) {
598
599 var currentMilliSecPerPixel , currentMilliSec , clickPos,thingToPush;
600 var i = 0,
601 tweensLength = this.tweens.length;
602
603 for (i = 0; i < tweensLength; i++) {
604
605 if (i === 0) {
606 // Exception: 0th item does not depend on anything
607 // If 0th tween is draggable, this will need to be fixed.
608 this.tweens[i].tweenData.spanWidth=0;
609 this.tweens[i].tweenData.spanPosition=0;
610 this.tweens[i].tweenData.keyFramePosition=0;
611 this.tweens[i].tweenData.keyFrameMillisec=0;
612
613 } else {
614 var prevKeyFramePosition = this.tweens[i - 1].tweenData.keyFramePosition,
615 myObj = {},
616 thing = {};
617
618 currentMilliSecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
619 currentMilliSec = this.tweens[i].tweenData.keyFrameMillisec;
620 clickPos = currentMilliSec / currentMilliSecPerPixel;
621
622 for (thing in this.tweens[i].tweenData) {
623 myObj[thing] = this.tweens[i].tweenData[thing];
624 }
625 myObj.spanWidth = clickPos - prevKeyFramePosition;
626 myObj.keyFramePosition = clickPos;
627 myObj.spanPosition = clickPos - (clickPos - prevKeyFramePosition);
628
629 this.tweens[i].tweenData = myObj;
630
631
632 }
633 }
634 this.application.ninja.timeline.zoomTrackContainerWidthChange();
635
636 }
637 },
638 596
639 handleClick:{ 597 handleClick:{
640 value:function (ev) { 598 value:function (ev) {