aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html16
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js22
2 files changed, 30 insertions, 8 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
index d416de5f..dc32d44d 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
@@ -53,7 +53,6 @@
53 } 53 }
54 } 54 }
55 }, 55 },
56
57 "styleTrackRepetition": { 56 "styleTrackRepetition": {
58 "prototype": "montage/ui/repetition.reel", 57 "prototype": "montage/ui/repetition.reel",
59 "properties": { 58 "properties": {
@@ -68,6 +67,19 @@
68 } 67 }
69 } 68 }
70 }, 69 },
70 "stylePropertyTrack" : {
71 "prototype" : "js/panels/Timeline/PropertyTrack.reel",
72 "properties" : {
73 "element":{"#": "style-track-base"}
74 },
75 "bindings" : {
76 "propTrackData" : {
77 "boundObject" : {"@" : "styleTrackRepetition"},
78 "boundObjectPropertyPath" : "objectAtCurrentIteration.propTrackData",
79 "oneway" : false
80 }
81 }
82 },
71 "positionTracksRepetition": { 83 "positionTracksRepetition": {
72 "prototype": "montage/ui/repetition.reel", 84 "prototype": "montage/ui/repetition.reel",
73 "properties": { 85 "properties": {
@@ -237,7 +249,7 @@
237 249
238 </div> 250 </div>
239 <div data-montage-id="content-styles" class="content-styles collapsible-content collapsible-collapsed"> 251 <div data-montage-id="content-styles" class="content-styles collapsible-content collapsible-collapsed">
240 <div class="timeline-track"></div> 252 <div data-montage-id="style-track-base"></div>
241 </div> 253 </div>
242 </div> 254 </div>
243 </div> 255 </div>
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();