aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel
diff options
context:
space:
mode:
authorJon Reid2012-03-07 14:29:49 -0800
committerJon Reid2012-03-07 14:29:49 -0800
commitde3b2f1dce91b8bf807e1b9264dbeb835d0c3006 (patch)
treefab6d272143daca45c87e691490d8698defb5d23 /js/panels/Timeline/Layer.reel
parent18be6028647017d053424cdd160ef7afc9351fd2 (diff)
parentabdd0542bce89b6b22f0684d00b9cf24e5d0a5e6 (diff)
downloadninja-de3b2f1dce91b8bf807e1b9264dbeb835d0c3006.tar.gz
Merge branch 'Timeline-serialkiller' into Timeline-local
Diffstat (limited to 'js/panels/Timeline/Layer.reel')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js59
1 files changed, 48 insertions, 11 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 81bd1867..d65d031f 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -38,13 +38,11 @@ var Layer = exports.Layer = Montage.create(Component, {
38 _arrLayerStyles : { 38 _arrLayerStyles : {
39 serializable: true, 39 serializable: true,
40 enumerable: true, 40 enumerable: true,
41 serializable: true,
42 value: [] 41 value: []
43 }, 42 },
44 arrLayerStyles : { 43 arrLayerStyles : {
45 serializable: true, 44 serializable: true,
46 enumerable: true, 45 enumerable: true,
47 serializable: true,
48 get: function() { 46 get: function() {
49 return this._arrLayerStyles; 47 return this._arrLayerStyles;
50 }, 48 },
@@ -110,7 +108,7 @@ var Layer = exports.Layer = Montage.create(Component, {
110 /* Position and Transform hottext values */ 108 /* Position and Transform hottext values */
111 _dtextPositionX : { 109 _dtextPositionX : {
112 value:null, 110 value:null,
113 serializable: true, 111 serializable: true
114 }, 112 },
115 113
116 dtextPositionX:{ 114 dtextPositionX:{
@@ -129,7 +127,7 @@ var Layer = exports.Layer = Montage.create(Component, {
129 127
130 _dtextPositionY : { 128 _dtextPositionY : {
131 value:null, 129 value:null,
132 serializable: true, 130 serializable: true
133 }, 131 },
134 132
135 dtextPositionY:{ 133 dtextPositionY:{
@@ -148,7 +146,7 @@ var Layer = exports.Layer = Montage.create(Component, {
148 146
149 _dtextScaleX : { 147 _dtextScaleX : {
150 value:null, 148 value:null,
151 serializable: true, 149 serializable: true
152 }, 150 },
153 151
154 dtextScaleX:{ 152 dtextScaleX:{
@@ -167,7 +165,7 @@ var Layer = exports.Layer = Montage.create(Component, {
167 165
168 _dtextScaleY : { 166 _dtextScaleY : {
169 value:null, 167 value:null,
170 serializable: true, 168 serializable: true
171 }, 169 },
172 170
173 dtextScaleY:{ 171 dtextScaleY:{
@@ -186,7 +184,7 @@ var Layer = exports.Layer = Montage.create(Component, {
186 184
187 _dtextSkewX : { 185 _dtextSkewX : {
188 value:null, 186 value:null,
189 serializable: true, 187 serializable: true
190 }, 188 },
191 189
192 dtextSkewX:{ 190 dtextSkewX:{
@@ -205,7 +203,7 @@ var Layer = exports.Layer = Montage.create(Component, {
205 203
206 _dtextSkewY : { 204 _dtextSkewY : {
207 value:null, 205 value:null,
208 serializable: true, 206 serializable: true
209 }, 207 },
210 208
211 dtextSkewY:{ 209 dtextSkewY:{
@@ -224,7 +222,7 @@ var Layer = exports.Layer = Montage.create(Component, {
224 222
225 _dtextRotate : { 223 _dtextRotate : {
226 value:null, 224 value:null,
227 serializable: true, 225 serializable: true
228 }, 226 },
229 227
230 dtextRotate:{ 228 dtextRotate:{
@@ -386,7 +384,46 @@ var Layer = exports.Layer = Montage.create(Component, {
386 this._bypassAnimation = newVal; 384 this._bypassAnimation = newVal;
387 } 385 }
388 }, 386 },
389 387
388 _layerData:{
389 serializable:true,
390 value:{}
391 },
392
393 layerData:{
394 serializable:true,
395 get:function(){
396 return this._layerData;
397 },
398 set:function(val){
399 this._layerData = val;
400 if(this._layerData){
401 this.setData();
402 }
403 }
404 },
405
406 setData:{
407 value:function(){
408 this.layerName = this.layerData.layerName;
409 this.layerID = this.layerData.layerID;
410 this.arrLayerStyles = this.layerData.arrLayerStyles;
411 this.isMainCollapsed = this.layerData.isMainCollapsed;
412 this.isPositionCollapsed = this.layerData.isPositionCollapsed;
413 this.isTransformCollapsed = this.layerData.isTransformCollapsed;
414 this.isSelected = this.layerData.isSelected;
415 this.isActive = this.layerData.isActive;
416 this.isStyleCollapsed = this.layerData.isStyleCollapsed;
417 this.bypassAnimation = this.layerData.bypassAnimation;
418 this.dtextPositionX = this.layerData.dtextPositionX;
419 this.dtextPositionY = this.layerData.dtextPositionY;
420 this.dtextSkewX = this.layerData.dtextSkewX;
421 this.dtextSkewY = this.layerData.dtextSkewY;
422 this.dtextScaleX = this.layerData.dtextScaleX;
423 this.dtextScaleY = this.layerData.dtextScaleY;
424 this.dtextRotate = this.layerData.dtextRotate;
425 }
426 },
390 427
391 /* END: Models */ 428 /* END: Models */
392 429
@@ -628,7 +665,7 @@ var Layer = exports.Layer = Montage.create(Component, {
628 }, 665 },
629 handleMousedown: { 666 handleMousedown: {
630 value: function(event) { 667 value: function(event) {
631 this.isActive = true; 668 this.layerData.isActive = true;
632 var ptrParent = nj.queryParentSelector(event.target, ".content-style"); 669 var ptrParent = nj.queryParentSelector(event.target, ".content-style");
633 if (ptrParent !== false) { 670 if (ptrParent !== false) {
634 this.selectStyle(this.getActiveStyleIndex()); 671 this.selectStyle(this.getActiveStyleIndex());