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.js29
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 },