aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
authorJonathan Duran2012-02-23 07:37:17 -0800
committerJonathan Duran2012-02-23 07:37:17 -0800
commitb7402018659cf8058d5646c08b2a916492269e33 (patch)
tree26ffeeaae45bbaaca9931e747e9532c1831c50fd /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
parentcc295dd0fb873505eed01c232bd987cf6e2dcdd9 (diff)
downloadninja-b7402018659cf8058d5646c08b2a916492269e33.tar.gz
Timeline Reset to clean Master branch. Code scrub.
Fresh copy of ninja-internal/master with Timeline folder copied in to resolved merge issues. Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js192
1 files changed, 136 insertions, 56 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 62688825..1c33a040 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -10,10 +10,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
10 }, 10 },
11 11
12 _trackID:{ 12 _trackID:{
13 value:null,
14 writable:true,
15 serializable:true, 13 serializable:true,
16 enumerable:true 14 value:null
17 }, 15 },
18 16
19 trackID:{ 17 trackID:{
@@ -85,21 +83,50 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
85 } 83 }
86 } 84 }
87 }, 85 },
88 86
89 _tweens:{ 87 _arrStyleTracks : {
90 serializable:true, 88 serializable:true,
91 enumerable:true, 89 enumerable:true,
90 value: []
91 },
92 arrStyleTracks: {
93 serializable:true,
94 enumerable:true,
95 get: function() {
96 return this._arrStyleTracks;
97 },
98 set: function(newVal) {
99 this._arrStyleTracks = newVal;
100 this.needsDraw = true;
101 }
102 },
103 _styleTracksRepetition: {
104 serializable: true,
105 value: null
106 },
107 styleTracksRepetition : {
108 serializable: true,
109 get: function() {
110 return this._styleTracksRepetition;
111 },
112 set: function(newVal) {
113 this._styleTracksRepetition = newVal;
114 this.needsDraw = true;
115 }
116 },
117
118 _tweens:{
119 enumerable: false,
92 value:[] 120 value:[]
93 }, 121 },
94 122
95 tweens:{ 123 tweens:{
96 serializable:true, 124 serializable:true,
97 enumerable:true,
98 get:function () { 125 get:function () {
99 return this._spans; 126 return this._tweens;
100 }, 127 },
101 set:function (newVal) { 128 set:function (newVal) {
102 this._spans = newVal; 129 this._tweens = newVal;
103 } 130 }
104 }, 131 },
105 132
@@ -118,14 +145,51 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
118 } 145 }
119 }, 146 },
120 147
148 _trackDuration:{
149 serializable: true,
150 value:0
151 },
152
121 trackDuration:{ 153 trackDuration:{
154 serializable:true,
155 get:function () {
156 return this._trackDuration;
157 },
158 set:function (val) {
159 this._trackDuration = val;
160 }
161 },
162
163 _trackPosition:{
164 serializable:true,
122 value:0 165 value:0
123 }, 166 },
124 167
125 currentKeyframeRule:{ 168 trackPosition:{
169 serializable:true,
170 get:function () {
171 return this._trackPosition;
172 },
173 set:function (val) {
174 this._trackPosition = val;
175 }
176 },
177
178 _currentKeyframeRule:{
179 serializable: true,
126 value:null 180 value:null
127 }, 181 },
128 182
183 currentKeyframeRule:{
184 serializable: true,
185 get:function(){
186 return this._currentKeyframeRule;
187 },
188 set:function(val){
189 this._currentKeyframeRule = val;
190 }
191 },
192
129 nextKeyframe:{ 193 nextKeyframe:{
130 value:1 194 value:1
131 }, 195 },
@@ -134,14 +198,23 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
134 value:0 198 value:0
135 }, 199 },
136 200
137 isAnimated:{ 201 _isTrackAnimated:{
138 value:false 202 serializable: true,
203 value:null
204 },
205
206 isTrackAnimated:{
207 serializable: true,
208 get:function(){
209 return this._isTrackAnimated;
210 },
211 set:function(val){
212 this._isTrackAnimated = val;
213 }
139 }, 214 },
140 215
141 _animatedElement:{ 216 _animatedElement:{
142 serializable:true, 217 serializable:true,
143 enumerable:true,
144 writable:true,
145 value:null 218 value:null
146 }, 219 },
147 220
@@ -155,12 +228,19 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
155 } 228 }
156 }, 229 },
157 230
158 animationName:{ 231 _animationName:{
232 serializable:true,
159 value:null 233 value:null
160 }, 234 },
161 235
162 keyFramePropertyData:{ 236 animationName:{
163 value:[] 237 serializable:true,
238 get:function () {
239 return this._animationName;
240 },
241 set:function (val) {
242 this._animationName = val;
243 }
164 }, 244 },
165 245
166 ninjaStylesContoller:{ 246 ninjaStylesContoller:{
@@ -184,8 +264,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
184 value:function () { 264 value:function () {
185 this.init(); 265 this.init();
186 this.ninjaStylesContoller = this.application.ninja.stylesController; 266 this.ninjaStylesContoller = this.application.ninja.stylesController;
187 this.track_lane.addEventListener("click", this, false); 267 this.element.addEventListener("click", this, false);
188 this.keyFramePropertyData = new Array();
189 } 268 }
190 }, 269 },
191 270
@@ -210,8 +289,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
210 value:function (ev) { 289 value:function (ev) {
211 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span 290 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span
212 // This needs to move to a keyboard shortcut that is TBD 291 // This needs to move to a keyboard shortcut that is TBD
292
293 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
294 //this.application.ninja.timeline.selectLayer(selectIndex);
295
213 if (ev.shiftKey) {