aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel
diff options
context:
space:
mode:
authorEric Guzman2012-03-17 00:05:14 -0700
committerEric Guzman2012-03-17 00:05:14 -0700
commita3192d8bc0f8c0698265817c14dcd2284fd89d7d (patch)
tree497ac55f550ed52f9d73b464aafb2aa6cb5f5038 /js/panels/Timeline/TimelineTrack.reel
parenta6a6f9bcc5ff92f5bb5e9275336dfaec2d8e8f4c (diff)
parent954f5a13e371febcb1c0fb8015c577ee51c23130 (diff)
downloadninja-a3192d8bc0f8c0698265817c14dcd2284fd89d7d.tar.gz
Merge branch 'refs/heads/master' into AddAnimationsLibrary
Conflicts: js/panels/presets/default-transition-presets.js
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html39
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js161
2 files changed, 96 insertions, 104 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
index 1cc05f4e..7e9b8a21 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html
@@ -32,44 +32,9 @@
32 "element":{"#": "track_lane"} 32 "element":{"#": "track_lane"}
33 }, 33 },
34 "bindings" : { 34 "bindings" : {
35 "spanWidth" : { 35 "tweenData" : {
36 "boundObject" : {"@": "tweenRepetition"}, 36 "boundObject" : {"@": "tweenRepetition"},
37 "boundObjectPropertyPath" : "objectAtCurrentIteration.spanWidth", 37 "boundObjectPropertyPath" : "objectAtCurrentIteration.tweenData",
38 "oneway" : false
39 },
40 "keyFramePosition" : {
41 "boundObject" : {"@": "tweenRepetition"},
42 "boundObjectPropertyPath" : "objectAtCurrentIteration.keyFramePosition",
43 "oneway" : false
44 },
45 "spanPosition" : {
46 "boundObject" : {"@": "tweenRepetition"},
47 "boundObjectPropertyPath" : "objectAtCurrentIteration.spanPosition",
48 "oneway" : false
49 },
50 "keyFrameMillisec" : {
51 "boundObject" : {"@": "tweenRepetition"},
52 "boundObjectPropertyPath" : "objectAtCurrentIteration.keyFrameMillisec",
53 "oneway" : false
54 },
55 "tweenID" : {
56 "boundObject" : {"@": "tweenRepetition"},
57 "boundObjectPropertyPath" : "objectAtCurrentIteration.tweenID",
58 "oneway" : false
59 },
60 "tweenedProperties" : {
61 "boundObject" : {"@": "tweenRepetition"},
62 "boundObjectPropertyPath" : "objectAtCurrentIteration.tweenedProperties",
63 "oneway" : false
64 },
65 "isTweenAnimated" : {
66 "boundObject" : {"@": "tweenRepetition"},
67 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTweenAnimated",
68 "oneway" : false
69 },
70 "isClearing" : {
71 "boundObject" : {"@": "tweenRepetition"},
72 "boundObjectPropertyPath" : "objectAtCurrentIteration.isClearing",
73 "oneway" : false 38 "oneway" : false
74 } 39 }
75 } 40 }
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 669dabef..c6b67c9c 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -27,7 +27,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
27 }, 27 },
28 set:function (value) { 28 set:function (value) {
29 this._trackID = value; 29 this._trackID = value;
30 this.needsDraw = true; 30 //this.needsDraw = true;
31 } 31 }
32 }, 32 },
33 33
@@ -114,7 +114,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
114 }, 114 },
115 set: function(newVal) { 115 set: function(newVal) {
116 this._arrStyleTracks = newVal; 116 this._arrStyleTracks = newVal;
117 this.needsDraw = true; 117 //this.needsDraw = true;
118 } 118 }
119 }, 119 },
120 _styleTracksRepetition: { 120 _styleTracksRepetition: {
@@ -128,7 +128,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
128 }, 128 },
129 set: function(newVal) { 129 set: function(newVal) {
130 this._styleTracksRepetition = newVal; 130 this._styleTracksRepetition = newVal;
131 this.needsDraw = true; 131 //needsDraw = true;
132 } 132 }
133 }, 133 },
134 134
@@ -146,7 +146,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
146 }, 146 },
147 set: function(newVal) { 147 set: function(newVal) {
148 this._arrPositionTracks = newVal; 148 this._arrPositionTracks = newVal;
149 this.needsDraw = true; 149 //this.needsDraw = true;
150 } 150 }
151 }, 151 },
152 _positionTracksRepetition: { 152 _positionTracksRepetition: {
@@ -160,7 +160,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
160 }, 160 },
161 set: function(newVal) { 161 set: function(newVal) {
162 this._positionTracksRepetition = newVal; 162 this._positionTracksRepetition = newVal;
163 this.needsDraw = true; 163 //this.needsDraw = true;
164 } 164 }
165 }, 165 },
166 166
@@ -179,7 +179,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
179 }, 179 },
180 set: function(newVal) { 180 set: function(newVal) {
181 this._arrTransformTracks = newVal; 181 this._arrTransformTracks = newVal;
182 this.needsDraw = true; 182 //this.needsDraw = true;
183 } 183 }
184 }, 184 },
185 _transformTracksRepetition: { 185 _transformTracksRepetition: {
@@ -193,7 +193,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
193 }, 193 },
194 set: function(newVal) { 194 set: function(newVal) {
195 this._transformTracksRepetition = newVal; 195 this._transformTracksRepetition = newVal;
196 this.needsDraw = true; 196 //this.needsDraw = true;
197 } 197 }
198 }, 198 },
199 199
@@ -209,7 +209,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
209 }, 209 },
210 set:function (newVal) { 210 set:function (newVal) {
211 this._tweens = newVal; 211 this._tweens = newVal;
212 this.needsDraw=true; 212 //this.needsDraw=true;
213 } 213 }
214 }, 214 },
215 215
@@ -345,6 +345,44 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
345 _styleCollapser:{ 345 _styleCollapser:{
346 value:null 346 value:null
347 }, 347 },
348
349 _trackData:{
350
351 },
352
353 trackData:{
354 serializable:true,
355 get:function(){
356 return this._trackData;
357 },
358 set:function(val){
359 this._trackData = val;
360 if(this._trackData){
361 this.setData();
362 }
363 }
364 },
365
366 setData:{
367 value:function(){
368 this.trackID = this.trackData.layerID;
369 this.tweens = this.trackData.tweens;
370 this.animatedElement = this.trackData.animatedElement;
371 this.arrStyleTracks = this.trackData.arrStyleTracks;
372 this.isTrackAnimated = this.trackData.isTrackAnimated;
373 this.trackDuration = this.trackData.trackDuration;
374 this.animationName = this.trackData.animationName;
375 this.currentKeyframeRule = this.trackData.currentKeyframeRule;
376 this.isMainCollapsed = this.trackData.isMainCollapsed;
377 this.isPositionCollapsed = this.trackData.isPositionCollapsed;
378 this.isTransformCollapsed = this.trackData.isTransformCollapsed;
379 this.bypassAnimation = this.trackData.bypassAnimation;
380 this.isStyleCollapsed = this.trackData.isStyleCollapsed;
381 this.trackPosition = this.trackData.trackPosition;
382 this.needsDraw = true;
383 }
384 },
385
348 prepareForDraw:{ 386 prepareForDraw:{
349 value:function () { 387 value:function () {
350 this.init(); 388 this.init();
@@ -356,20 +394,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
356 draw:{ 394 draw:{
357 value:function () { 395 value:function () {
358 this.ninjaStylesContoller = this.application.ninja.stylesController; 396 this.ninjaStylesContoller = this.application.ninja.stylesController;
359 return; 397 var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID);
360 if (this._mainCollapser.isCollapsed !== this.isMainCollapsed) { 398 if(this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]){
361 this._mainCollapser.toggle(false); 399 this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0];
362 }
363 if (this._positionCollapser.isCollapsed !== this.isP