aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js232
1 files changed, 172 insertions, 60 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index c6b67c9c..84d93ea3 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -26,8 +26,32 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
26 return this._trackID; 26 return this._trackID;
27 }, 27 },
28 set:function (value) { 28 set:function (value) {
29 this._trackID = value; 29 if (value !== this._trackID) {
30 //this.needsDraw = true; 30 this._trackID = value;
31 this.trackData.layerID = value;
32 }
33 }
34 },
35 _isVisible:{
36 value: true
37 },
38
39 isVisible:{
40 get:function(){
41 return this._isVisible;
42 },
43 set:function(value){
44 if (this._isVisible !== value) {
45 this._isVisible = value;
46 if (this.element !== null) {
47 if (value === true) {
48 this.element.classList.remove("layer-hidden");
49 } else {
50 this.element.classList.add("layer-hidden");
51 }
52 }
53 }
54 this.trackData.isVisible = value;
31 } 55 }
32 }, 56 },
33 57
@@ -40,11 +64,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
40 return this._isMainCollapsed; 64 return this._isMainCollapsed;
41 }, 65 },
42 set:function (newVal) { 66 set:function (newVal) {
43 this.log('TimelineTrack.js: isMainCollapsed: ', newVal); 67 this._isMainCollapsed = newVal;
44 if (newVal !== this._isMainCollapsed) { 68 this.trackData.isMainCollapsed = newVal;
45 this._isMainCollapsed = newVal;
46 }
47
48 } 69 }
49 }, 70 },
50 _isTransformCollapsed:{ 71 _isTransformCollapsed:{
@@ -55,9 +76,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
55 return this._isTransformCollapsed; 76 return this._isTransformCollapsed;
56 }, 77 },
57 set:function (newVal) { 78 set:function (newVal) {
58 if (newVal !== this._isTransformCollapsed) { 79 this._isTransformCollapsed = newVal;
59 this._isTransformCollapsed = newVal; 80 this.trackData.isTransformCollapsed = newVal;
60 }
61 } 81 }
62 }, 82 },
63 _isPositionCollapsed:{ 83 _isPositionCollapsed:{
@@ -68,9 +88,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
68 return this._isPositionCollapsed; 88 return this._isPositionCollapsed;
69 }, 89 },
70 set:function (newVal) { 90 set:function (newVal) {
71 if (newVal !== this._isPositionCollapsed) { 91 this._isPositionCollapsed = newVal;
72 this._isPositionCollapsed = newVal; 92 this.trackData.isPositionCollapsed = newVal;
73 }
74 } 93 }
75 }, 94 },
76 _isStyleCollapsed:{ 95 _isStyleCollapsed:{
@@ -81,9 +100,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
81 return this._isStyleCollapsed; 100 return this._isStyleCollapsed;
82 }, 101 },
83 set:function (newVal) { 102 set:function (newVal) {
84 if (newVal !== this._isStyleCollapsed) { 103 this._isStyleCollapsed = newVal;
85 this._isStyleCollapsed = newVal; 104 this.trackData.isStyleCollapsed = newVal;
86 }
87 } 105 }
88 }, 106 },
89 _bypassAnimation : { 107 _bypassAnimation : {
@@ -96,8 +114,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
96 return this._bypassAnimation; 114 return this._bypassAnimation;
97 }, 115 },
98 set: function(newVal) { 116 set: function(newVal) {
99 //console.log("timelinetrack bypassAnimation setter " + newVal) 117 if (typeof(this.trackData) !== "undefined") {
100 this._bypassAnimation = newVal; 118 this._bypassAnimation = newVal;
119 this.trackData.bypassAnimation = newVal;
120 }
101 } 121 }
102 }, 122 },
103 123
@@ -114,7 +134,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
114 }, 134 },
115 set: function(newVal) { 135 set: function(newVal) {
116 this._arrStyleTracks = newVal; 136 this._arrStyleTracks = newVal;
117 //this.needsDraw = true; 137 this.trackData.arrStyleTracks = newVal;
118 } 138 }
119 }, 139 },
120 _styleTracksRepetition: { 140 _styleTracksRepetition: {
@@ -128,7 +148,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
128 }, 148 },
129 set: function(newVal) { 149 set: function(newVal) {
130 this._styleTracksRepetition = newVal; 150 this._styleTracksRepetition = newVal;
131 //needsDraw = true;
132 } 151 }
133 }, 152 },
134 153
@@ -146,7 +165,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
146 }, 165 },
147 set: function(newVal) { 166 set: function(newVal) {
148 this._arrPositionTracks = newVal; 167 this._arrPositionTracks = newVal;
149 //this.needsDraw = true; 168 this.trackData.arrPositionTracks = newVal;
150 } 169 }
151 }, 170 },
152 _positionTracksRepetition: { 171 _positionTracksRepetition: {
@@ -160,7 +179,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
160 }, 179 },
161 set: function(newVal) { 180 set: function(newVal) {
162 this._positionTracksRepetition = newVal; 181 this._positionTracksRepetition = newVal;
163 //this.needsDraw = true;
164 } 182 }
165 }, 183 },
166 184
@@ -179,7 +197,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
179 }, 197 },
180 set: function(newVal) { 198 set: function(newVal) {
181 this._arrTransformTracks = newVal; 199 this._arrTransformTracks = newVal;
182 //this.needsDraw = true; 200 this.trackData.arrTransformTracks = newVal;
183 } 201 }
184 }, 202 },
185 _transformTracksRepetition: { 203 _transformTracksRepetition: {
@@ -193,7 +211,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
193 }, 211 },
194 set: function(newVal) { 212 set: function(newVal) {
195 this._transformTracksRepetition = newVal; 213 this._transformTracksRepetition = newVal;
196 //this.needsDraw = true;
197 } 214 }
198 }, 215 },
199 216
@@ -209,7 +226,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
209 }, 226 },
210 set:function (newVal) { 227 set:function (newVal) {
211 this._tweens = newVal; 228 this._tweens = newVal;
212 //this.needsDraw=true; 229 this.trackData.tweens = newVal;
213 } 230 }
214 }, 231 },
215 232
@@ -243,6 +260,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
243 if(this._trackDuration > this.application.ninja.timeline.masterDuration){ 260 if(this._trackDuration > this.application.ninja.timeline.masterDuration){
244 this.application.ninja.timeline.masterDuration = this._trackDuration; 261 this.application.ninja.timeline.masterDuration = this._trackDuration;
245 } 262 }
263 this.trackData.trackDuration = val;
246 } 264 }
247 }, 265 },
248 266
@@ -258,6 +276,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
258 }, 276 },
259 set:function (val) { 277 set:function (val) {
260 this._trackPosition = val; 278 this._trackPosition = val;
279 this.trackData.trackPosition = val;
261 } 280 }
262 }, 281 },
263 282
@@ -273,6 +292,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
273 }, 292 },
274 set:function(val){ 293 set:function(val){