diff options
author | Jonathan Duran | 2012-07-17 18:42:58 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-07-17 18:42:58 -0700 |
commit | 1cc51014b0e1465316f26e6cf31e78ac0e32ff18 (patch) | |
tree | c52db7f9827d6efc961b6d296ed44e623daa42dc /js/panels/Timeline/TimelineTrack.reel | |
parent | 42a51e0c27f2e2cd825d07b3af5ec05b0e5208b3 (diff) | |
parent | 49233086e159137bf6d6b0ee73947475b0d08092 (diff) | |
download | ninja-1cc51014b0e1465316f26e6cf31e78ac0e32ff18.tar.gz |
Merge branch 'refs/heads/Timeline-local-kruti' into TimelineUber
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 44 |
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) { |