diff options
author | Jonathan Duran | 2012-05-24 09:34:05 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-24 09:34:05 -0700 |
commit | 2e4831cf0fe04f37a179f84b098ae0899d4e40b8 (patch) | |
tree | 7d130c07f1ed61ecb85870852fbeaed63d0a200b /js/panels/Timeline/TimelineTrack.reel | |
parent | f92838b6ec33e2eb0f8eb06f3cbc7419f38143a1 (diff) | |
download | ninja-2e4831cf0fe04f37a179f84b098ae0899d4e40b8.tar.gz |
recreating layer props
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index faa3ba77..47e04d71 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -834,9 +834,17 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
834 | 834 | ||
835 | recreatePropertyTracks:{ | 835 | recreatePropertyTracks:{ |
836 | value:function(ruleSet){ | 836 | value:function(ruleSet){ |
837 | |||
838 | //var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); | ||
839 | //var test = this.application.ninja.timeline.layerRepetition.childComponents[0].addStyle(); | ||
840 | //console.log(test); | ||
841 | |||
837 | for(var i in ruleSet){ | 842 | for(var i in ruleSet){ |
838 | //console.log(i); | 843 | console.log(i); |
839 | //console.log(ruleSet[i]); | 844 | //console.log(ruleSet[i]); |
845 | var styleProp = ruleSet[i][0].style[0]; | ||
846 | console.log(styleProp); | ||
847 | this.application.ninja.timeline.layerRepetition.childComponents[0].addStyle(styleProp); | ||
840 | } | 848 | } |
841 | } | 849 | } |
842 | }, | 850 | }, |
@@ -958,9 +966,22 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
958 | 966 | ||
959 | this.arrStyleTracks.push(newStyleTrack); | 967 | this.arrStyleTracks.push(newStyleTrack); |
960 | 968 | ||
961 | } else if (layerEvent.layerEventType === "deleteStyle") { | 969 | } else if (layerEvent.layerEventType === "restoreStyle") { |
962 | // TODO: Delete the right track. Index can be passed in event object, use that for splice(). | 970 | var restoredStyleTrack = {}; |
963 | this.arrStyleTracks.pop(); | 971 | restoredStyleTrack.propTrackData = {}; |
972 | restoredStyleTrack.propTrackData.styleSelection = layerEvent.styleSelection; | ||
973 | restoredStyleTrack.propTrackData.propTweens = []; | ||
974 | restoredStyleTrack.propTrackData.trackType = "style"; | ||
975 | restoredStyleTrack.propTrackData.trackEditorProperty = layerEvent.trackEditorProperty; | ||
976 | restoredStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; | ||
977 | |||
978 | this.arrStyleTracks.push(restoredStyleTrack); | ||
979 | |||
980 | this.isStyleCollapsed = true; | ||
981 | } | ||
982 | else if (layerEvent.layerEventType === "deleteStyle") { | ||
983 | // TODO: Delete the right track. Index can be passed in event object, use that for splice(). | ||
984 | this.arrStyleTracks.pop(); | ||
964 | } | 985 | } |
965 | } | 986 | } |
966 | }, | 987 | }, |