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.js144
1 files changed, 121 insertions, 23 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 5206ae16..9cf321b1 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -102,6 +102,7 @@ var Layer = exports.Layer = Montage.create(Component, {
102 }, 102 },
103 set:function(value){ 103 set:function(value){
104 this._layerID = value; 104 this._layerID = value;
105 this.layerData.layerID = value;
105 } 106 }
106 }, 107 },
107 108
@@ -119,7 +120,7 @@ var Layer = exports.Layer = Montage.create(Component, {
119 set:function(value){ 120 set:function(value){
120 if (this._dtextPositionX !== value) { 121 if (this._dtextPositionX !== value) {
121 this._dtextPositionX = value; 122 this._dtextPositionX = value;
122 //this.needsDraw = true; 123 this.layerData.dtextPositionX = value;
123 } 124 }
124 125
125 } 126 }
@@ -138,7 +139,7 @@ var Layer = exports.Layer = Montage.create(Component, {
138 set:function(value){ 139 set:function(value){
139 if (this._dtextPositionY !== value) { 140 if (this._dtextPositionY !== value) {
140 this._dtextPositionY = value; 141 this._dtextPositionY = value;
141 //this.needsDraw = true; 142 this.layerData.dtextPositionY = value;
142 } 143 }
143 144
144 } 145 }
@@ -157,7 +158,7 @@ var Layer = exports.Layer = Montage.create(Component, {
157 set:function(value){ 158 set:function(value){
158 if (this._dtextScaleX !== value) { 159 if (this._dtextScaleX !== value) {
159 this._dtextScaleX = value; 160 this._dtextScaleX = value;
160 //this.needsDraw = true; 161 this.layerData.dtextScaleX = value;
161 } 162 }
162 163
163 } 164 }
@@ -176,7 +177,7 @@ var Layer = exports.Layer = Montage.create(Component, {
176 set:function(value){ 177 set:function(value){
177 if (this._dtextScaleY !== value) { 178 if (this._dtextScaleY !== value) {
178 this._dtextScaleY = value; 179 this._dtextScaleY = value;
179 //this.needsDraw = true; 180 this.layerData.dtextScaleY = value;
180 } 181 }
181 182
182 } 183 }
@@ -195,7 +196,7 @@ var Layer = exports.Layer = Montage.create(Component, {
195 set:function(value){ 196 set:function(value){
196 if (this._dtextSkewX !== value) { 197 if (this._dtextSkewX !== value) {
197 this._dtextSkewX = value; 198 this._dtextSkewX = value;
198 //this.needsDraw = true; 199 this.layerData.dtextSkewX = value;
199 } 200 }
200 201
201 } 202 }
@@ -214,7 +215,7 @@ var Layer = exports.Layer = Montage.create(Component, {
214 set:function(value){ 215 set:function(value){
215 if (this._dtextSkewY !== value) { 216 if (this._dtextSkewY !== value) {
216 this._dtextSkewY = value; 217 this._dtextSkewY = value;
217 //this.needsDraw = true; 218 this.layerData.dtextSkewY = value;
218 } 219 }
219 220
220 } 221 }
@@ -233,7 +234,7 @@ var Layer = exports.Layer = Montage.create(Component, {
233 set:function(value){ 234 set:function(value){
234 if (this._dtextRotate !== value) { 235 if (this._dtextRotate !== value) {
235 this._dtextRotate = value; 236 this._dtextRotate = value;
236 //this.needsDraw = true; 237 this.layerData.dtextRotate = value;
237 } 238 }
238 239
239 } 240 }
@@ -278,6 +279,7 @@ var Layer = exports.Layer = Montage.create(Component, {
278 }, 279 },
279 set: function(newVal) { 280 set: function(newVal) {
280 this._isActive = newVal; 281 this._isActive = newVal;
282 this.layerData.isActive = newVal;
281 } 283 }
282 }, 284 },
283 285
@@ -294,6 +296,7 @@ var Layer = exports.Layer = Montage.create(Component, {
294 }, 296 },
295 set:function(value){ 297 set:function(value){
296 this._isAnimated = value; 298 this._isAnimated = value;
299 this.layerData.isAnimated = newVal;
297 } 300 }
298 }, 301 },
299 _justAdded: { 302 _justAdded: {
@@ -314,9 +317,10 @@ var Layer = exports.Layer = Montage.create(Component, {
314 return this._isMainCollapsed; 317 return this._isMainCollapsed;
315 }, 318 },
316 set: function(newVal) { 319 set: function(newVal) {
317 this.log('layer.js: isMainCollapsed: ' + newVal);
318 if (newVal !== this._isMainCollapsed) { 320 if (newVal !== this._isMainCollapsed) {
321 this.log('layer.js: isMainCollapsed: ' + newVal);
319 this._isMainCollapsed = newVal; 322 this._isMainCollapsed = newVal;
323 this.layerData.isMainCollapsed = newVal;
320 } 324 }
321 } 325 }
322 }, 326 },
@@ -333,7 +337,7 @@ var Layer = exports.Layer = Montage.create(Component, {
333 set: function(newVal) { 337 set: function(newVal) {
334 if (newVal !== this._isTransformCollapsed) { 338 if (newVal !== this._isTransformCollapsed) {
335 this._isTransformCollapsed = newVal; 339 this._isTransformCollapsed = newVal;
336 //this.needsDraw = true; 340 this.layerData.isTransformCollapsed = newVal;
337 } 341 }
338 } 342 }
339 }, 343 },
@@ -350,7 +354,7 @@ var Layer = exports.Layer = Montage.create(Component, {
350 set: function(newVal) { 354 set: function(newVal) {
351 if (newVal !== this._isPositionCollapsed) { 355 if (newVal !== this._isPositionCollapsed) {
352 this._isPositionCollapsed = newVal; 356 this._isPositionCollapsed = newVal;
353 //this.needsDraw = true; 357 this.layerData.isPositionCollapsed = newVal;
354 } 358 }
355 } 359 }
356 }, 360 },
@@ -367,7 +371,7 @@ var Layer = exports.Layer = Montage.create(Component, {
367 set: function(newVal) { 371 set: function(newVal) {
368 if (newVal !== this._isStyleCollapsed) { 372 if (newVal !== this._isStyleCollapsed) {
369 this._isStyleCollapsed = newVal; 373 this._isStyleCollapsed = newVal;
370 //this.needsDraw = true; 374 this.layerData.isStyleCollapsed = newVal;
371 } 375 }
372 } 376 }
373 }, 377 },
@@ -381,9 +385,17 @@ var Layer = exports.Layer = Montage.create(Component, {
381 return this._bypassAnimation; 385 return this._bypassAnimation;
382 }, 386 },
383 set: function(newVal) { 387 set: function(newVal) {
384 this._bypassAnimation = newVal; 388 if (newVal !== this._bypassAnimation) {
389 this._bypassAnimation = newVal;
390 this.layerData.bypassAnimation = newVal;
391 }
385 } 392 }
386 }, 393 },
394
395 // Is this the first draw?
396 _isFirstDraw : {
397 value: true
398 },
387 399
388 _layerData:{ 400 _layerData:{
389 serializable:true, 401 serializable:true,
@@ -426,10 +438,34 @@ var Layer = exports.Layer = Montage.create(Component, {
426 this.needsDraw = true; 438 this.needsDraw = true;
427 } 439 }
428 }, 440 },
429 _isFirstDraw : { 441
430 value: true 442 /* Data binding point and outgoing binding trigger method */
443 _bindingPoint : {
444 serializable: true,
445 value : {}
446 },
447 bindingPoint: {
448 serializable: true,
449 get: function() {
450 return this._bindingPoint;
451 },
452 set: function(newVal) {
453 if (newVal !== this._bindingPoint) {
454 this._bindingPoint = newVal;
455 this.setData();
456 }
457 }
458 },
459
460 triggerOutgoingBinding : {
461 value: function() {
462 if (this.layerData.triggerBinding === true) {
463 this.layerData.triggerBinding = false;
464 } else {
465 this.layerData.triggerBinding = true;
466 }
467 }
431 }, 468 },
432
433 /* END: Models */ 469 /* END: Models */
434