diff options
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 22 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css | 16 |
2 files changed, 29 insertions, 9 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index a38ecb30..6066066a 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -730,7 +730,17 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
730 | this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; | 730 | this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; |
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 | ||
735 | var animationNameList = this.animationName.split(","); | ||
736 | if(animationNameList.length > 1){ | ||
737 | this.animationName = animationNameList[0]; | ||
738 | this.extractKeyframesFromRules(animationNameList); | ||
739 | } | ||
740 | |||
733 | this.animationNamesString = this.animationName; | 741 | this.animationNamesString = this.animationName; |
742 | |||
743 | // build tweens for this tracks's keyframe rule | ||
734 | if(this.animationName){ | 744 | if(this.animationName){ |
735 | trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); | 745 | trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); |
736 | this.nextKeyframe = 0; | 746 | this.nextKeyframe = 0; |
@@ -796,6 +806,18 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
796 | } | 806 | } |
797 | }, | 807 | }, |
798 | 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 | |||
799 | addAnimationRuleToElement:{ | 821 | addAnimationRuleToElement:{ |
800 | value:function (tweenEvent) { | 822 | value:function (tweenEvent) { |
801 | this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop; | 823 | this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop; |
diff --git a/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css b/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css index 57e4dce6..03d1cf8d 100644 --- a/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css +++ b/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css | |||
@@ -1,15 +1,13 @@ | |||
1 | @charset "UTF-8"; | 1 | @charset "UTF-8"; |
2 | |||
3 | /* <copyright> | 2 | /* <copyright> |
4 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | 3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> |
5 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | 4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> |
6 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
7 | </copyright> */ | 6 | </copyright> */ |
8 | |||
9 | /* TimelineTrack.scss | 7 | /* TimelineTrack.scss |
10 | * Main SCSS file for TimelineTrack component, compiled by SASS into the file css/TimelineTrack.css. | 8 | * Main SCSS file for TimelineTrack component, compiled by SASS into the file css/TimelineTrack.css. |
11 | */ | 9 | */ |
12 | /* line 16, ../scss/TimelineTrack.scss */ | 10 | /* line 22, ../scss/TimelineTrack.scss */ |
13 | .tracklane { | 11 | .tracklane { |
14 | height: 19px; | 12 | height: 19px; |
15 | width: 100%; | 13 | width: 100%; |
@@ -22,7 +20,7 @@ | |||
22 | overflow: hidden; | 20 | overflow: hidden; |
23 | } | 21 | } |
24 | 22 | ||
25 | /* line 28, ../scss/TimelineTrack.scss */ | 23 | /* line 34, ../scss/TimelineTrack.scss */ |
26 | .keyframe { | 24 | .keyframe { |
27 | position: absolute; | 25 | position: absolute; |
28 | height: 16px; | 26 | height: 16px; |
@@ -30,7 +28,7 @@ | |||
30 | background-color: white; | 28 | background-color: white; |
31 | } | 29 | } |
32 | 30 | ||
33 | /* line 36, ../scss/TimelineTrack.scss */ | 31 | /* line 42, ../scss/TimelineTrack.scss */ |
34 | .defaultSpan { | 32 | .defaultSpan { |
35 | position: absolute; | 33 | position: absolute; |
36 | height: 16px; | 34 | height: 16px; |
@@ -38,23 +36,23 @@ | |||
38 | background-color: white; | 36 | background-color: white; |
39 | } | 37 | } |
40 | 38 | ||
41 | /* line 45, ../scss/TimelineTrack.scss */ | 39 | /* line 51, ../scss/TimelineTrack.scss */ |
42 | .tl_layertracks .content-position { | 40 | .tl_layertracks .content-position { |
43 | height: 63px; | 41 | height: 63px; |
44 | } | 42 | } |
45 | 43 | ||
46 | /* line 48, ../scss/TimelineTrack.scss */ | 44 | /* line 54, ../scss/TimelineTrack.scss */ |
47 | .tl_layertracks .content-transform { | 45 | .tl_layertracks .content-transform { |
48 | height: 106px; | 46 | height: 106px; |
49 | } | 47 | } |
50 | 48 | ||
51 | /* line 52, ../scss/TimelineTrack.scss */ | 49 | /* line 58, ../scss/TimelineTrack.scss */ |
52 | .tl_layertracks .collapsible-content.collapsible-collapsed { | 50 | .tl_layertracks .collapsible-content.collapsible-collapsed { |
53 | overflow: hidden; | 51 | overflow: hidden; |
54 | height: 0px; | 52 | height: 0px; |
55 | } | 53 | } |
56 | 54 | ||
57 | /* line 57, ../scss/TimelineTrack.scss */ | 55 | /* line 63, ../scss/TimelineTrack.scss */ |
58 | .tl_layertracks .collapsible-content .collapsible-label { | 56 | .tl_layertracks .collapsible-content .collapsible-label { |
59 | height: 21px; | 57 | height: 21px; |
60 | background-color: #474747; | 58 | background-color: #474747; |