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.js35
1 files changed, 29 insertions, 6 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 2fe60d72..faa3ba77 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -321,6 +321,19 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
321 } 321 }
322 }, 322 },
323 323
324 _ruleList:{
325 value:[]
326 },
327
328 ruleList:{
329 get:function () {
330 return this._ruleList;
331 },
332 set:function (val) {
333 this._ruleList = val;
334 }
335 },
336
324 animationNamesString:{ 337 animationNamesString:{
325 value:"" 338 value:""
326 }, 339 },
@@ -735,7 +748,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
735 var animationNameList = this.animationName.split(","); 748 var animationNameList = this.animationName.split(",");
736 if(animationNameList.length > 1){ 749 if(animationNameList.length > 1){
737 this.animationName = animationNameList[0]; 750 this.animationName = animationNameList[0];
738 this.extractKeyframesFromRules(animationNameList); 751 this.getAllAnimationRules(animationNameList);
739 } 752 }
740 753
741 this.animationNamesString = this.animationName; 754 this.animationNamesString = this.animationName;
@@ -806,14 +819,24 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
806 } 819 }
807 }, 820 },
808 821
809 extractKeyframesFromRules:{ 822 getAllAnimationRules:{
810 value:function(ruleNames){ 823 value:function(ruleNames){
811 //console.log(ruleNames); 824 //console.log(ruleNames);
825
812 for(var i in ruleNames){ 826 for(var i in ruleNames){
813 console.log(ruleNames[i].replace(/^\s+|\s+$/g,"")); 827 var currentName = ruleNames[i].replace(/^\s+|\s+$/g,""); // trim whitespace
814 var currName = ruleNames[i].replace(/^\s+|\s+$/g,""); 828 var currentRule = this.application.ninja.stylesController.getAnimationRuleWithName(currentName, this.application.ninja.currentDocument._document);
815 var test = this.application.ninja.stylesController.getAnimationRuleWithName(currName, this.application.ninja.currentDocument._document); 829 this.ruleList[currentName] = currentRule;
816 console.log(test); 830 }
831 this.recreatePropertyTracks(this.ruleList);
832 }
833 },
834
835 recreatePropertyTracks:{
836 value:function(ruleSet){
837 for(var i in ruleSet){
838 //console.log(i);
839 //console.log(ruleSet[i]);
817 } 840 }
818 } 841 }
819 }, 842 },