From 0dc43f8b6d7db6d9ed698e8c4568e942d8e3d8eb Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 22 May 2012 10:28:16 -0700 Subject: more sub prop doc open support Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 8beb7b5d..6066066a 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, { this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; if(this.animatedElement!==undefined){ this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); + + // check for multiple animation names var animationNameList = this.animationName.split(","); if(animationNameList.length > 1){ this.animationName = animationNameList[0]; + this.extractKeyframesFromRules(animationNameList); } this.animationNamesString = this.animationName; - + + // build tweens for this tracks's keyframe rule if(this.animationName){ trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); this.nextKeyframe = 0; @@ -802,6 +806,18 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } }, + extractKeyframesFromRules:{ + value:function(ruleNames){ + //console.log(ruleNames); + for(var i in ruleNames){ + console.log(ruleNames[i].replace(/^\s+|\s+$/g,"")); + var currName = ruleNames[i].replace(/^\s+|\s+$/g,""); + var test = this.application.ninja.stylesController.getAnimationRuleWithName(currName, this.application.ninja.currentDocument._document); + console.log(test); + } + } + }, + addAnimationRuleToElement:{ value:function (tweenEvent) { this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop; -- cgit v1.2.3