From eaef072648eb539e648aabf7bc1aea8d02c21085 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Fri, 4 May 2012 21:46:29 -0700 Subject: property track additions to serialization data object Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | 2 +- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'js/panels/Timeline/TimelineTrack.reel') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index de2969bb..ed013505 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html @@ -72,7 +72,7 @@ "element":{"#": "style-track-base"} }, "bindings" : { - "trackData" : { + "propTrackData" : { "boundObject" : {"@" : "styleTrackRepetition"}, "boundObjectPropertyPath" : "objectAtCurrentIteration.propTrackData", "oneway" : false diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 000c81e2..8bb00990 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -710,7 +710,17 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } if (layerEvent.layerEventType === "newStyle") { // TODO: Add a real track of tweens. Probably need a method for that. - this.arrStyleTracks.push("1"); + + var newStyleTrack = {}; + newStyleTrack.propTrackData = {}; + newStyleTrack.propTrackData.styleSelection = layerEvent.styleSelection; + newStyleTrack.propTrackData.propTweens = []; + newStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; + console.log(layerEvent.styleSelection); + console.log(layerEvent.styleIndex); + + this.arrStyleTracks.push(newStyleTrack); + } else if (layerEvent.layerEventType === "deleteStyle") { // TODO: Delete the right track. Index can be passed in event object, use that for splice(). this.arrStyleTracks.pop(); -- cgit v1.2.3