aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Reid2012-05-22 10:33:40 -0700
committerJon Reid2012-05-22 10:33:40 -0700
commit1324301feea23f9d66c9ca2f52e004b552e9ed96 (patch)
tree3e447e7013619461d47c57d01ec0feb2b8d37414
parent119fec85a659cc470377032abab8c6e60fa55b1b (diff)
parent0dc43f8b6d7db6d9ed698e8c4568e942d8e3d8eb (diff)
downloadninja-1324301feea23f9d66c9ca2f52e004b552e9ed96.tar.gz
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index e4e90d51..2fe60d72 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -730,13 +730,17 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
730 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.stageElement; 730 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.stageElement;
731 if(this.animatedElement!==undefined){ 731 if(this.animatedElement!==undefined){
732 this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); 732 this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name");
733
734 // check for multiple animation names
733 var animationNameList = this.animationName.split(","); 735 var animationNameList = this.animationName.split(",");
734 if(animationNameList.length > 1){ 736 if(animationNameList.length > 1){
735 this.animationName = animationNameList[0]; 737 this.animationName = animationNameList[0];
738 this.extractKeyframesFromRules(animationNameList);
736 } 739 }
737 740
738 this.animationNamesString = this.animationName; 741 this.animationNamesString = this.animationName;
739 742
743 // build tweens for this tracks's keyframe rule
740 if(this.animationName){ 744 if(this.animationName){
741 trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); 745 trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration");
742 this.nextKeyframe = 0; 746 this.nextKeyframe = 0;
@@ -802,6 +806,18 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
802 } 806 }
803 }, 807 },
804 808
809 extractKeyframesFromRules:{
810 value:function(ruleNames){
811 //console.log(ruleNames);
812 for(var i in ruleNames){
813 console.log(ruleNames[i].replace(/^\s+|\s+$/g,""));
814 var currName = ruleNames[i].replace(/^\s+|\s+$/g,"");
815 var test = this.application.ninja.stylesController.getAnimationRuleWithName(currName, this.application.ninja.currentDocument._document);
816 console.log(test);
817 }
818 }
819 },
820
805 addAnimationRuleToElement:{ 821 addAnimationRuleToElement:{
806 value:function (tweenEvent) { 822 value:function (tweenEvent) {
807 this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop; 823 this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop;