aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
authorJon Reid2012-06-12 13:32:02 -0700
committerJon Reid2012-06-12 13:32:02 -0700
commit8c55dfcb0a669eef0a3bb406b70868078ef09810 (patch)
treee4d070fe1e67fea38cc0343eda297572da717efa /js/panels/Timeline
parent8e98ce012f55576ddb979969a3a1d834301af0c7 (diff)
parent7887aafbff794e9c5f918c667e73a8386c38cf02 (diff)
downloadninja-8c55dfcb0a669eef0a3bb406b70868078ef09810.tar.gz
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r--js/panels/Timeline/Collapser.js34
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js26
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.html30
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js282
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js.orig1057
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js89
-rw-r--r--js/panels/Timeline/Style.reel/Style.html7
-rw-r--r--js/panels/Timeline/Style.reel/Style.js706
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html6
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js91
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js3
11 files changed, 1984 insertions, 347 deletions
diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js
index 9c8d4434..42bbbb86 100644
--- a/js/panels/Timeline/Collapser.js
+++ b/js/panels/Timeline/Collapser.js
@@ -41,6 +41,7 @@ var Montage = require("montage/core/core").Montage,
41 value: 0 41 value: 0
42 }, 42 },
43 contentHeight: { 43 contentHeight: {
44 serializable: true,
44 get: function() { 45 get: function() {
45 return this._contentHeight; 46 return this._contentHeight;
46 }, 47 },
@@ -59,6 +60,7 @@ var Montage = require("montage/core/core").Montage,
59 value: false 60 value: false
60 }, 61 },
61 isAnimated: { 62 isAnimated: {
63 serializable: true,
62 get: function() { 64 get: function() {
63 return this._isAnimated; 65 return this._isAnimated;
64 }, 66 },
@@ -71,6 +73,7 @@ var Montage = require("montage/core/core").Montage,
71 value: true 73 value: true
72 }, 74 },
73 bypassAnimation: { 75 bypassAnimation: {
76 serializable: true,
74 get: function() { 77 get: function() {
75 return this._bypassAnimation; 78 return this._bypassAnimation;
76 }, 79 },
@@ -102,6 +105,7 @@ var Montage = require("montage/core/core").Montage,
102 value: "" 105 value: ""
103 }, 106 },
104 isCollapsed : { 107 isCollapsed : {
108 serializable: true,
105 get: function() { 109 get: function() {
106 return this._isCollapsed; 110 return this._isCollapsed;
107 }, 111 },
@@ -110,7 +114,6 @@ var Montage = require("montage/core/core").Montage,
110 this._isCollapsed = newVal; 114 this._isCollapsed = newVal;
111 //this.needsDraw = true; 115 //this.needsDraw = true;
112 } 116 }
113
114 } 117 }
115 }, 118 },
116 119
@@ -141,6 +144,7 @@ var Montage = require("montage/core/core").Montage,
141 value: true 144 value: true
142 }, 145 },
143 isLabelClickable : { 146 isLabelClickable : {
147 serializable: true,
144 get: function() { 148 get: function() {
145 return this._isLabelClickable; 149 return this._isLabelClickable;
146 }, 150 },
@@ -149,6 +153,34 @@ var Montage = require("montage/core/core").Montage,
149 } 153 }
150 }, 154 },
151 155
156 _myContent:{
157 value:null
158 },
159
160 myContent:{
161 serializable:true,
162 get:function () {
163 return this._myContent;
164 },
165 set:function (newVal) {
166 this._myContent = newVal;
167 }
168 },
169
170 _clicker:{
171 value:null
172 },
173
174 clicker:{
175 serializable:true,
176 get:function () {
177 return this._clicker;
178 },
179 set:function (newVal) {
180 this._clicker = newVal;
181 }
182 },
183
152 // isToggling: Bindable property. Set this (to anything) to trigger a toggle. 184 // isToggling: Bindable property. Set this (to anything) to trigger a toggle.
153 _isToggling: { 185 _isToggling: {
154 value: true 186 value: true
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js
index b91027b6..ba6952aa 100644
--- a/js/panels/Timeline/Keyframe.reel/Keyframe.js
+++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js
@@ -28,6 +28,21 @@ var Keyframe = exports.Keyframe = Montage.create(Component, {
28 } 28 }
29 }, 29 },
30 30
31 _isSelected:{
32 value:false
33 },
34
35 isSelected:{
36 serializable:true,
37 get:function(){
38 return this._isSelected;
39 },
40 set:function(value){
41 this._isSelected = value;
42 this.needsDraw = true;
43 }
44 },
45
31 prepareForDraw:{ 46 prepareForDraw:{
32 value:function(){ 47 value:function(){
33 this.element.addEventListener("click", this, false); 48 this.element.addEventListener("click", this, false);
@@ -42,21 +57,28 @@ var Keyframe = exports.Keyframe = Montage.create(Component, {
42 57
43 draw:{ 58 draw:{
44 value:function(){ 59 value:function(){
60 if(this.isSelected){
61 this.element.classList.add("keyframeSelected");
62 this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty;
63 }else{
64 this.element.classList.remove("keyframeSelected");
65 }
45 this.element.style.left = (this.position - 5) + "px"; 66 this.element.style.left = (this.position - 5) + "px";
46 } 67 }
47 }, 68 },
48 69
49 deselectKeyframe:{ 70 deselectKeyframe:{
50 value:function(){ 71 value:function(){
51 this.element.classList.remove("keyframeSelected"); 72 this.isSelected=false;
52 this.element.style.left = (this.position - 5) + "px"; 73 this.element.style.left = (this.position - 5) + "px";
53 } 74 }
54 }, 75 },
55 76
56 selectKeyframe:{ 77 selectKeyframe:{
57 value:function(){ 78 value:function(){
58 this.element.classList.add("keyframeSelected"); 79 this.isSelected=true;
59 this.element.style.left = (this.position - 6) + "px"; 80 this.element.style.left = (this.position - 6) + "px";
81 this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty
60 this.parentComponent.selectTween(); 82 this.parentComponent.selectTween();
61 } 83 }
62 }, 84 },
diff --git a/js/panels/Timeline/Layer.reel/Layer.html b/js/panels/Timeline/Layer.reel/Layer.html
index 44022211..3648cbbb 100644
--- a/js/panels/Timeline/Layer.reel/Layer.html
+++ b/js/panels/Timeline/Layer.reel/Layer.html
@@ -22,7 +22,12 @@
22 "positionCollapser" : {"@" : "positionCollapser"}, 22 "positionCollapser" : {"@" : "positionCollapser"},
23 "styleCollapser" : {"@" : "styleCollapser"}, 23 "styleCollapser" : {"@" : "styleCollapser"},
24 "clickerMain" : {"#" : "clicker-main"}, 24 "clickerMain" : {"#" : "clicker-main"},
25 "myLabel" : {"#" : "myLabel"} 25 "myLabel" : {"#" : "myLabel"},
26 "leftControl": {"@" : "dtext_position_x"},
27 "topControl": {"@" : "dtext_position_y"},
28 "widthControl": {"@" : "dtext_scale_x"},
29 "heightControl": {"@" : "dtext_scale_y"},
30 "styleType":{"@" : "style"}
26 } 31 }
27 }, 32 },
28 "dtext1" : { 33 "dtext1" : {
@@ -105,7 +110,12 @@
105 "boundObject" : {"@": "repetition1"}, 110 "boundObject" : {"@": "repetition1"},
106 "boundObjectPropertyPath" : "objectAtCurrentIteration.ruleTweener", 111 "boundObjectPropertyPath" : "objectAtCurrentIteration.ruleTweener",
107 "oneway" : false 112 "oneway" : false
108 } 113 },
114 "colorelement" : {
115 "boundObject" : {"@": "repetition1"},
116 "boundObjectPropertyPath" : "objectAtCurrentIteration.colorelement",
117 "oneway" : false
118 }
109 } 119 }
110 }, 120 },
111 "dtext_position_x" : { 121 "dtext_position_x" : {
@@ -148,10 +158,10 @@
148 "prototype": "js/components/hottextunit.reel[HotTextUnit]", 158 "prototype": "js/components/hottextunit.reel[HotTextUnit]",
149 "properties": { 159 "properties": {
150 "element": {"#": "scale-x"}, 160