aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel/Layer.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js237
1 files changed, 167 insertions, 70 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 5206ae16..3bcc1401 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -67,10 +67,7 @@ var Layer = exports.Layer = Montage.create(Component, {
67 67
68 /* Layer models: the name, ID, and selected and animation booleans for the layer */ 68 /* Layer models: the name, ID, and selected and animation booleans for the layer */
69 _layerName:{ 69 _layerName:{
70 serializable: true, 70 value: "Default Layer Name"
71 value:null,
72 writable:true,
73 enumerable:true
74 }, 71 },
75 72
76 layerName:{ 73 layerName:{
@@ -79,20 +76,17 @@ var Layer = exports.Layer = Montage.create(Component, {
79 return this._layerName; 76 return this._layerName;
80 }, 77 },
81 set:function(newVal){ 78 set:function(newVal){
82 if (newVal !== this._layerName) { 79
83 this._layerEditable.value = newVal; 80 this._layerEditable.value = newVal;
84 this._layerName = newVal; 81 this._layerName = newVal;
85 this.layerData.layerName = newVal; 82 this.layerData.layerName = newVal;
86 this.log('layerName setter: ' + newVal) 83 if (typeof(this.dynamicLayerName) !== "undefined") {
87 } 84 this.dynamicLayerName.value = newVal;
88 85 }
89 } 86 }
90 }, 87 },
91 _layerID:{ 88 _layerID:{
92 value:null, 89 value: "Default Layer ID"
93 writable:true,
94 serializable: true,
95 enumerable:true
96 }, 90 },
97 91
98 layerID:{ 92 layerID:{
@@ -102,6 +96,7 @@ var Layer = exports.Layer = Montage.create(Component, {
102 }, 96 },
103 set:function(value){ 97 set:function(value){
104 this._layerID = value; 98 this._layerID = value;
99 this.layerData.layerID = value;
105 } 100 }
106 }, 101 },
107 102
@@ -119,7 +114,7 @@ var Layer = exports.Layer = Montage.create(Component, {
119 set:function(value){ 114 set:function(value){
120 if (this._dtextPositionX !== value) { 115 if (this._dtextPositionX !== value) {
121 this._dtextPositionX = value; 116 this._dtextPositionX = value;
122 //this.needsDraw = true; 117 this.layerData.dtextPositionX = value;
123 } 118 }
124 119
125 } 120 }
@@ -138,7 +133,7 @@ var Layer = exports.Layer = Montage.create(Component, {
138 set:function(value){ 133 set:function(value){
139 if (this._dtextPositionY !== value) { 134 if (this._dtextPositionY !== value) {
140 this._dtextPositionY = value; 135 this._dtextPositionY = value;
141 //this.needsDraw = true; 136 this.layerData.dtextPositionY = value;
142 } 137 }
143 138
144 } 139 }
@@ -157,7 +152,7 @@ var Layer = exports.Layer = Montage.create(Component, {
157 set:function(value){ 152 set:function(value){
158 if (this._dtextScaleX !== value) { 153 if (this._dtextScaleX !== value) {
159 this._dtextScaleX = value; 154 this._dtextScaleX = value;
160 //this.needsDraw = true; 155 this.layerData.dtextScaleX = value;
161 } 156 }
162 157
163 } 158 }
@@ -176,7 +171,7 @@ var Layer = exports.Layer = Montage.create(Component, {
176 set:function(value){ 171 set:function(value){
177 if (this._dtextScaleY !== value) { 172 if (this._dtextScaleY !== value) {
178 this._dtextScaleY = value; 173 this._dtextScaleY = value;
179 //this.needsDraw = true; 174 this.layerData.dtextScaleY = value;
180 } 175 }
181 176
182 } 177 }
@@ -195,7 +190,7 @@ var Layer = exports.Layer = Montage.create(Component, {
195 set:function(value){ 190 set:function(value){
196 if (this._dtextSkewX !== value) { 191 if (this._dtextSkewX !== value) {
197 this._dtextSkewX = value; 192 this._dtextSkewX = value;
198 //this.needsDraw = true; 193 this.layerData.dtextSkewX = value;
199 } 194 }
200 195
201 } 196 }
@@ -214,7 +209,7 @@ var Layer = exports.Layer = Montage.create(Component, {
214 set:function(value){ 209 set:function(value){
215 if (this._dtextSkewY !== value) { 210 if (this._dtextSkewY !== value) {
216 this._dtextSkewY = value; 211 this._dtextSkewY = value;
217 //this.needsDraw = true; 212 this.layerData.dtextSkewY = value;
218 } 213 }
219 214
220 } 215 }
@@ -233,7 +228,7 @@ var Layer = exports.Layer = Montage.create(Component, {
233 set:function(value){ 228 set:function(value){
234 if (this._dtextRotate !== value) { 229 if (this._dtextRotate !== value) {
235 this._dtextRotate = value; 230 this._dtextRotate = value;
236 //this.needsDraw = true; 231 this.layerData.dtextRotate = value;
237 } 232 }
238 233
239 } 234 }
@@ -278,6 +273,7 @@ var Layer = exports.Layer = Montage.create(Component, {
278 }, 273 },
279 set: function(newVal) { 274 set: function(newVal) {
280 this._isActive = newVal; 275 this._isActive = newVal;
276 this.layerData.isActive = newVal;
281 } 277 }
282 }, 278 },
283 279
@@ -294,6 +290,7 @@ var Layer = exports.Layer = Montage.create(Component, {
294 }, 290 },
295 set:function(value){ 291 set:function(value){
296 this._isAnimated = value; 292 this._isAnimated = value;
293 this.layerData.isAnimated = newVal;
297 } 294 }
298 }, 295 },
299 _justAdded: { 296 _justAdded: {
@@ -314,10 +311,9 @@ var Layer = exports.Layer = Montage.create(Component, {
314 return this._isMainCollapsed; 311 return this._isMainCollapsed;
315 }, 312 },
316 set: function(newVal) { 313 set: function(newVal) {
317 this.log('layer.js: isMainCollapsed: ' + newVal); 314 this._isMainCollapsed = newVal;
318 if (newVal !== this._isMainCollapsed) { 315 this.layerData.isMainCollapsed = newVal;
319 this._isMainCollapsed = newVal; 316
320 }
321 } 317 }
322 }, 318 },
323 319
@@ -331,10 +327,8 @@ var Layer = exports.Layer = Montage.create(Component, {
331 return this._isTransformCollapsed; 327 return this._isTransformCollapsed;
332 }, 328 },
333 set: function(newVal) { 329 set: function(newVal) {
334 if (newVal !== this._isTransformCollapsed) { 330 this._isTransformCollapsed = newVal;
335 this._isTransformCollapsed = newVal; 331 this.layerData.isTransformCollapsed = newVal;
336 //this.needsDraw = true;
337 }
338 } 332 }
339 }, 333 },
340 334
@@ -348,10 +342,8 @@ var Layer = exports.Layer = Montage.create(Component, {
348 return this._isPositionCollapsed; 342 return this._isPositionCollapsed;
349 }, 343 },
350 set: function(newVal) { 344 set: function(newVal) {
351 if (newVal !== this._isPositionCollapsed) { 345 this._isPositionCollapsed = newVal;
352 this._isPositionCollapsed = newVal; 346 this.layerData.isPositionCollapsed = newVal;
353 //this.needsDraw = true;
354 }
355 } 347 }
356 }, 348 },
357 349
@@ -365,10 +357,8 @@ var Layer = exports.Layer = Montage.create(Component, {
365 return this._isStyleCollapsed; 357 return this._isStyleCollapsed;
366 }, 358 },
367 set: function(newVal) { 359 set: function(newVal) {
368 if (newVal !== this._isStyleCollapsed) { 360 this._isStyleCollapsed = newVal;
369 this._isStyleCollapsed = newVal; 361 this.layerData.isStyleCollapsed = newVal;
370 //this.needsDraw = true;
371 }
372 } 362 }
373 }, 363 },
374 _bypassAnimation : { 364 _bypassAnimation : {
@@ -381,9 +371,17 @@ var Layer = exports.Layer = Montage.create(Component, {
381 return this._bypassAnimation; 371 return this._bypassAnimation;
382 }, 372 },
383 set: function(newVal) { 373 set: function(newVal) {
384 this._bypassAnimation = newVal; 374 if (typeof(this.layerData) !== "undefined") {
375 this._bypassAnimation = newVal;