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.js22
1 files changed, 16 insertions, 6 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 836bb60f..63f2f957 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -223,10 +223,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
223 223
224 tweenRepetition:{ 224 tweenRepetition:{
225 get:function () { 225 get:function () {
226 return this._spanRepetition; 226 return this._tweenRepetition;
227 }, 227 },
228 set:function (newVal) { 228 set:function (newVal) {
229 this._spanRepetition = newVal; 229 this._tweenRepetition = newVal;
230 } 230 }
231 }, 231 },
232 232
@@ -393,7 +393,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
393 this.bypassAnimation = this.trackData.bypassAnimation; 393 this.bypassAnimation = this.trackData.bypassAnimation;
394 this.trackID = this.trackData.layerID; 394 this.trackID = this.trackData.layerID;
395 this.tweens = this.trackData.tweens; 395 this.tweens = this.trackData.tweens;
396 this.animatedElement = this.trackData.animatedElement; // unneeded with one element per layer restriction 396 this.animatedElement = this.trackData.animatedElement;
397 this.arrStyleTracks = this.trackData.arrStyleTracks; 397 this.arrStyleTracks = this.trackData.arrStyleTracks;
398 this.isTrackAnimated = this.trackData.isTrackAnimated; 398 this.isTrackAnimated = this.trackData.isTrackAnimated;
399 this.trackDuration = this.trackData.trackDuration; 399 this.trackDuration = this.trackData.trackDuration;
@@ -518,7 +518,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
518 if (selectedIndex !== false) { 518 if (selectedIndex !== false) {
519 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { 519 if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) {
520 this.retrieveStoredTweens(); 520 this.retrieveStoredTweens();
521
522 } 521 }
523 } 522 }
524 } 523 }
@@ -609,6 +608,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
609 this.updateKeyframeRule(); 608 this.updateKeyframeRule();
610 } 609 }
611 } else { 610 } else {
611 // TEMP error check
612 console.log("There must be exactly one element in an animated layer."); 612 console.log("There must be exactly one element in an animated layer.");
613 } 613 }
614 } 614 }
@@ -630,7 +630,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
630 insertTween:{ 630 insertTween:{
631 value:function (clickPos) { 631 value:function (clickPos) {
632 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); 632 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
633 this.application.ninja.timeline.selectLayer(selectedIndex, true); 633 this.application.ninja.timeline.selectLayer(selectedIndex, true);
634 634
635 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); 635 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
636 var currentMillisec = currentMillisecPerPixel * clickPos; 636 var currentMillisec = currentMillisecPerPixel * clickPos;
@@ -813,7 +813,17 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
813 } 813 }
814 if (layerEvent.layerEventType === "newStyle") { 814 if (layerEvent.layerEventType === "newStyle") {
815 // TODO: Add a real track of tweens. Probably need a method for that. 815 // TODO: Add a real track of tweens. Probably need a method for that.
816 this.arrStyleTracks.push("1"); 816
817 var newStyleTrack = {};
818 newStyleTrack.propTrackData = {};
819 newStyleTrack.propTrackData.styleSelection = layerEvent.styleSelection;
820 newStyleTrack.propTrackData.propTweens = [];
821 newStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex;
822 console.log(layerEvent.styleSelection);
823 console.log(layerEvent.styleIndex);
824
825 this.arrStyleTracks.push(newStyleTrack);
826
817 } else if (layerEvent.layerEventType === "deleteStyle") { 827 } else if (layerEvent.layerEventType === "deleteStyle") {
818 // TODO: Delete the right track. Index can be passed in event object, use that for splice(). 828 // TODO: Delete the right track. Index can be passed in event object, use that for splice().
819 this.arrStyleTracks.pop(); 829 this.arrStyleTracks.pop();