diff options
author | Jon Reid | 2012-05-23 13:15:26 -0700 |
---|---|---|
committer | Jon Reid | 2012-05-23 13:15:26 -0700 |
commit | bae00e5a647b5b6a677857a1bb531273a89e781b (patch) | |
tree | aa747a092ef42dcb88f0910e7123e839e5561955 /js | |
parent | f6c90db55e6118b744d492e38e9e967afc64d14b (diff) | |
parent | f92838b6ec33e2eb0f8eb06f3cbc7419f38143a1 (diff) | |
download | ninja-bae00e5a647b5b6a677857a1bb531273a89e781b.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 2 | ||||
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/css/Keyframe.css | 8 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 35 | ||||
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 1 |
4 files changed, 35 insertions, 11 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index a4f957cf..52302319 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -42,7 +42,7 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
42 | 42 | ||
43 | draw:{ | 43 | draw:{ |
44 | value:function(){ | 44 | value:function(){ |
45 | this.element.style.left = (this.position - 3) + "px"; | 45 | this.element.style.left = (this.position - 6) + "px"; |
46 | } | 46 | } |
47 | }, | 47 | }, |
48 | 48 | ||
diff --git a/js/panels/Timeline/Keyframe.reel/css/Keyframe.css b/js/panels/Timeline/Keyframe.reel/css/Keyframe.css index ff5dae7a..36166c1c 100644 --- a/js/panels/Timeline/Keyframe.reel/css/Keyframe.css +++ b/js/panels/Timeline/Keyframe.reel/css/Keyframe.css | |||
@@ -6,11 +6,13 @@ | |||
6 | 6 | ||
7 | .tween_keyframe{ | 7 | .tween_keyframe{ |
8 | position: absolute; | 8 | position: absolute; |
9 | height: 16px; | 9 | height: 10px; |
10 | width: 5px; | 10 | width: 10px; |
11 | top: 3px; | ||
11 | background-color: white; | 12 | background-color: white; |
12 | z-index: 23; | 13 | z-index: 23; |
13 | border-radius: 3px; | 14 | border-radius: 2px; |
15 | -webkit-transform: rotate(45deg); | ||
14 | } | 16 | } |
15 | 17 | ||
16 | .tween_keyframe.keyframeSelected{ | 18 | .tween_keyframe.keyframeSelected{ |
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 | }, |
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 2a21c330..414c0535 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -248,7 +248,6 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
248 | } else { | 248 | } else { |
249 | this.parentComponent.parentComponent.updateKeyframeRule(); | 249 | this.parentComponent.parentComponent.updateKeyframeRule(); |
250 | } | 250 | } |
251 | |||
252 | } | 251 | } |
253 | }, | 252 | }, |
254 | 253 | ||