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.js72
1 files changed, 36 insertions, 36 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index d10cd39d..f9c710c6 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -69,7 +69,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
69 positionPropertyTrack:{ 69 positionPropertyTrack:{
70 value:null 70 value:null
71 }, 71 },
72 72
73 _isFirstDraw: { 73 _isFirstDraw: {
74 value: true 74 value: true
75 }, 75 },
@@ -96,7 +96,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
96 this.trackData.isVisible = value; 96 this.trackData.isVisible = value;
97 } 97 }
98 }, 98 },
99 99
100 _stageElement: { 100 _stageElement: {
101 value: null 101 value: null
102 }, 102 },
@@ -174,7 +174,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
174 } 174 }
175 } 175 }
176 }, 176 },
177 177
178 _arrStyleTracks : { 178 _arrStyleTracks : {
179 value: [] 179 value: []
180 }, 180 },
@@ -200,7 +200,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
200 this._styleTracksRepetition = newVal; 200 this._styleTracksRepetition = newVal;
201 } 201 }
202 }, 202 },
203 203
204 /* Position Property Tracks */ 204 /* Position Property Tracks */
205 _arrPositionTracks : { 205 _arrPositionTracks : {
206 value: [] 206 value: []
@@ -213,7 +213,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
213 set: function(newVal) { 213 set: function(newVal) {
214 this._arrPositionTracks = newVal; 214 this._arrPositionTracks = newVal;
215 this.trackData.arrPositionTracks = newVal; 215 this.trackData.arrPositionTracks = newVal;
216 216
217 } 217 }
218 }, 218 },
219 _positionTracksRepetition: { 219 _positionTracksRepetition: {
@@ -495,7 +495,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
495 } 495 }
496 } 496 }
497 }, 497 },
498 498
499 _setDataTimestamp : { 499 _setDataTimestamp : {
500 value: false 500 value: false
501 }, 501 },
@@ -533,7 +533,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
533 tempData.bypassAnimation = this.bypassAnimation; 533 tempData.bypassAnimation = this.bypassAnimation;
534 tempData.trackID = this.layerID; 534 tempData.trackID = this.layerID;
535 tempData.tweens = this.tweens; 535 tempData.tweens = this.tweens;
536 tempData.animatedElement = this.animatedElement; 536 tempData.animatedElement = this.animatedElement;
537 tempData.arrStyleTracks = this.arrStyleTracks; 537 tempData.arrStyleTracks = this.arrStyleTracks;
538 tempData.arrPositionTracks = this.arrPositionTracks; 538 tempData.arrPositionTracks = this.arrPositionTracks;
539 tempData.isTrackAnimated = this.isTrackAnimated; 539 tempData.isTrackAnimated = this.isTrackAnimated;
@@ -549,7 +549,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
549 this.trackData = tempData; 549 this.trackData = tempData;
550 } 550 }
551 }, 551 },
552 552
553 // Data binding observation point and trigger method 553 // Data binding observation point and trigger method
554 _bindingPoint : { 554 _bindingPoint : {
555 value : {} 555 value : {}
@@ -565,7 +565,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
565 } 565 }
566 } 566 }
567 }, 567 },
568 568
569 triggerOutgoingBinding : { 569 triggerOutgoingBinding : {
570 value: function() { 570 value: function() {
571 this.trackData.triggerBinding = !this.trackData.triggerBinding; 571 this.trackData.triggerBinding = !this.trackData.triggerBinding;
@@ -578,8 +578,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
578 this.ninjaStylesContoller = this.application.ninja.stylesController; 578 this.ninjaStylesContoller = this.application.ninja.stylesController;
579 this.element.addEventListener("click", this, false); 579 this.element.addEventListener("click", this, false);
580 this.eventManager.addEventListener("tlZoomSlider", this, false); 580 this.eventManager.addEventListener("tlZoomSlider", this, false);
581 581
582 // Drag and Drop event handlers 582 // Drag and Drop event handlers
583 //this.element.addEventListener("dragover", this.handleKeyframeDragover.bind(this), false); 583 //this.element.addEventListener("dragover", this.handleKeyframeDragover.bind(this), false);
584 this.element.addEventListener("dragstart", this.handleKeyframeDragstart.bind(this), false); 584 this.element.addEventListener("dragstart", this.handleKeyframeDragstart.bind(this), false);
585 this.element.addEventListener("dragend", this.handleKeyframeDragend.bind(this), false); 585 this.element.addEventListener("dragend", this.handleKeyframeDragend.bind(this), false);
@@ -647,9 +647,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
647 } 647 }
648 } 648 }
649 } 649 }
650 650
651 if (this._isFirstDraw === true) { 651 if (this._isFirstDraw === true) {
652 652
653 if (this.isMainCollapsed === false) { 653 if (this.isMainCollapsed === false) {
654 this._mainCollapser.myContent.style.height = "auto"; 654 this._mainCollapser.myContent.style.height = "auto";
655 this._mainCollapser.myContent.classList.remove(this._mainCollapser.collapsedClass); 655 this._mainCollapser.myContent.classList.remove(this._mainCollapser.collapsedClass);
@@ -672,19 +672,19 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
672 } 672 }
673 this._isFirstDraw = false; 673 this._isFirstDraw = false;
674 } 674 }
675 675
676 } 676 }
677 }, 677 },
678 678
679 handleTlZoomSlider: { 679 handleTlZoomSlider: {
680 value: function(event) { 680 value: function(event) {
681 681
682 var currentMilliSecPerPixel , currentMilliSec , clickPos,thingToPush; 682 var currentMilliSecPerPixel , currentMilliSec , clickPos,thingToPush;
683 var i = 0, 683 var i = 0,
684 tweensLength = this.tweens.length; 684 tweensLength = this.tweens.length;
685 685
686 for (i = 0; i < tweensLength; i++) { 686 for (i = 0; i < tweensLength; i++) {
687 687
688 if (i === 0) { 688 if (i === 0) {
689 // Exception: 0th item does not depend on anything 689 // Exception: 0th item does not depend on anything
690 // TODO: If 0th tween is draggable, this will need to be fixed. 690 // TODO: If 0th tween is draggable, this will need to be fixed.
@@ -692,7 +692,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
692 this.tweens[i].tweenData.spanPosition=0; 692 this.tweens[i].tweenData.spanPosition=0;
693 this.tweens[i].tweenData.keyFramePosition=0; 693 this.tweens[i].tweenData.keyFramePosition=0;
694 this.tweens[i].tweenData.keyFrameMillisec=0; 694 this.tweens[i].tweenData.keyFrameMillisec=0;
695 695
696 } else { 696 } else {
697 var prevKeyFramePosition = this.tweens[i - 1].tweenData.keyFramePosition, 697 var prevKeyFramePosition = this.tweens[i - 1].tweenData.keyFramePosition,
698 myObj = {}, 698 myObj = {},
@@ -769,7 +769,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
769 769
770 handleNewTween:{ 770 handleNewTween:{
771 value:function (ev) { 771 value:function (ev) {
772 772
773 if (ev.offsetX > this.tweens[this.tweens.length - 1].tweenData.keyFramePosition) { 773 if (ev.offsetX > this.tweens[this.tweens.length - 1].tweenData.keyFramePosition) {
774 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 774 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
775 this.application.ninja.timeline.selectLayer(selectedIndex, false); 775 this.application.ninja.timeline.selectLayer(selectedIndex, false);
@@ -906,8 +906,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
906 value:function (position) { 906 value:function (position) {
907 var i, j, nextComponentIndex, 907 var i, j, nextComponentIndex,
908 tweensLength = this.tweens.length-1, 908 tweensLength = this.tweens.length-1,
909 prevTween, 909 prevTween,
910 nextTween, 910 nextTween,
911 splitTweenIndex; 911 splitTweenIndex;
912 912
913 // Search through the tweens and find the pair whose keyframes bracket position. 913 // Search through the tweens and find the pair whose keyframes bracket position.
@@ -915,7 +915,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
915 prevTween = this.tweens[i].tweenData.keyFramePosition; 915 prevTween = this.tweens[i].tweenData.keyFramePosition;
916 nextTween = this.tweens[i+1].tweenData.keyFramePosition; 916 nextTween = this.tweens[i+1].tweenData.keyFramePosition;
917 if(position > prevTween && position < nextTween) { 917 if(position > prevTween && position < nextTween) {
918 918
919 // We will insert a new tween at this index 919 // We will insert a new tween at this index
920 splitTweenIndex = i+1; 920 splitTweenIndex = i+1;
921 921
@@ -924,7 +924,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
924 this.tweens[i+1].spanPosition = position; 924 this.tweens[i+1].spanPosition = position;
925 this.tweens[i+1].tweenData.spanWidth = this.tweens[i+1].tweenData.keyFramePosition - position; 925 this.tweens[i+1].tweenData.spanWidth = this.tweens[i+1].tweenData.keyFramePosition - position;