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.js299
1 files changed, 160 insertions, 139 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 16fb0303..db4ad712 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -51,6 +51,7 @@ var Layer = exports.Layer = Montage.create(Component, {
51 value: false 51 value: false
52 }, 52 },
53 styleRepetition : { 53 styleRepetition : {
54 serializable: true,
54 get: function() { 55 get: function() {
55 return this._styleRepetition; 56 return this._styleRepetition;
56 }, 57 },
@@ -61,10 +62,37 @@ var Layer = exports.Layer = Montage.create(Component, {
61 _styleCounter : { 62 _styleCounter : {
62 value: 0 63 value: 0
63 }, 64 },
65 styleCounter:{
66 serializable:true,
67 get:function () {
68 return this._styleCounter;
69 },
70 set:function (newVal) {
71 this._styleCounter = newVal;
72 }
73 },
74 _selectedStyleIndex: {
75 value: false
76 },
77 selectedStyleIndex: {
78 get: function() {
79 return this._selectedStyleIndex;
80 },
81 set: function(newVal) {
82 if (typeof(newVal) === "undefined") {
83 return;
84 }
85 if (newVal !== this._selectedStyleIndex) {
86 this._selectedStyleIndex = newVal;
87 this.layerData.selectedStyleIndex = newVal;
88 this.needsDraw = true;
89 }
90 }
91 },
64 92
65 /* Layer models: the name, ID, and selected and animation booleans for the layer */ 93 /* Layer models: the name, ID, and selected and animation booleans for the layer */
66 _layerName:{ 94 _layerName:{
67 value: "Default Layer Name" 95 value: ""
68 }, 96 },
69 97
70 layerName:{ 98 layerName:{
@@ -73,13 +101,22 @@ var Layer = exports.Layer = Montage.create(Component, {
73 return this._layerName; 101 return this._layerName;
74 }, 102 },
75 set:function(newVal){ 103 set:function(newVal){
104 if (this._layerEditable.value !== newVal) {
105 this._layerEditable.value = newVal;
106 }
107 if (this._layerName !== newVal) {
108 this._layerName = newVal;
109 }
110 if (this.layerData.layerName !== newVal) {
111 this.layerData.layerName = newVal;
112 }
76 113
77 this._layerEditable.value = newVal;
78 this._layerName = newVal;
79 this.layerData.layerName = newVal;
80 if (typeof(this.dynamicLayerName) !== "undefined") { 114 if (typeof(this.dynamicLayerName) !== "undefined") {
81 this.dynamicLayerName.value = newVal; 115 if (this.dynamicLayerName.value !== newVal) {
116 this.dynamicLayerName.value = newVal;
117 }
82 } 118 }
119 this.needsDraw = true;
83 } 120 }
84 }, 121 },
85 _layerID:{ 122 _layerID:{
@@ -123,6 +160,20 @@ var Layer = exports.Layer = Montage.create(Component, {
123 } 160 }
124 }, 161 },
125 162
163 _stageElement: {
164 value: null
165 },
166
167 stageElement: {
168 get: function() {
169 return this._stageElement;
170 },
171 set: function(newVal) {
172 this._stageElement = newVal;
173 this.layerData.stageElement = newVal;
174 }
175 },
176
126 177
127 _elementsList : { 178 _elementsList : {
128 value: [] 179 value: []
@@ -137,7 +188,7 @@ var Layer = exports.Layer = Montage.create(Component, {
137 } 188 }
138 }, 189 },
139 190
140 /* Position and Transform hottext values */ 191 /* Position and Size hottext values */
141 _dtextPositionX : { 192 _dtextPositionX : {
142 value:null 193 value:null
143 }, 194 },
@@ -210,60 +261,6 @@ var Layer = exports.Layer = Montage.create(Component, {
210 } 261 }
211 }, 262 },
212 263
213 _dtextSkewX : {
214 value:null
215 },
216
217 dtextSkewX:{
218 serializable: true,
219 get:function(){
220 return this._dtextSkewX;
221 },
222 set:function(value){
223 if (this._dtextSkewX !== value) {
224 this._dtextSkewX = value;
225 this.layerData.dtextSkewX = value;
226 }
227
228 }
229 },
230
231 _dtextSkewY : {
232 value:null
233 },
234
235 dtextSkewY:{
236 serializable: true,
237 get:function(){
238 return this._dtextSkewY;
239 },
240 set:function(value){
241 if (this._dtextSkewY !== value) {
242 this._dtextSkewY = value;
243 this.layerData.dtextSkewY = value;
244 }
245
246 }
247 },
248
249 _dtextRotate : {
250 value:null
251 },
252
253 dtextRotate:{
254 serializable: true,
255 get:function(){
256 return this._dtextRotate;
257 },
258 set:function(value){
259 if (this._dtextRotate !== value) {
260 this._dtextRotate = value;
261 this.layerData.dtextRotate = value;
262 }
263
264 }
265 },
266
267 /* isSelected: whether or not the layer is currently selected. */ 264 /* isSelected: whether or not the layer is currently selected. */
268 _isSelected:{ 265 _isSelected:{
269 value: false 266 value: false
@@ -362,20 +359,6 @@ var Layer = exports.Layer = Montage.create(Component, {
362 } 359 }
363 }, 360 },
364 361
365 _isTransformCollapsed : {
366 value: true
367 },
368 isTransformCollapsed : {
369 serializable: true,
370 get: function() {
371 return this._isTransformCollapsed;
372 },
373 set: function(newVal) {
374 this._isTransformCollapsed = newVal;
375 this.layerData.isTransformCollapsed = newVal;
376 }
377 },
378
379 _isPositionCollapsed : { 362 _isPositionCollapsed : {
380 value: true 363 value: true
381 }, 364 },
@@ -456,10 +439,10 @@ var Layer = exports.Layer = Montage.create(Component, {
456 439
457 this.layerName = this.layerData.layerName; 440 this.layerName = this.layerData.layerName;
458 this.layerID = this.layerData.layerID; 441 this.layerID = this.layerData.layerID;
442 this.stageElement = this.layerData.stageElement
459 this.arrLayerStyles = this.layerData.arrLayerStyles; 443 this.arrLayerStyles = this.layerData.arrLayerStyles;
460 this.isMainCollapsed = this.layerData.isMainCollapsed; 444 this.isMainCollapsed = this.layerData.isMainCollapsed;
461 this.isPositionCollapsed = this.layerData.isPositionCollapsed; 445 this.isPositionCollapsed = this.layerData.isPositionCollapsed;
462 this.isTransformCollapsed = this.layerData.isTransformCollapsed;
463 this.isSelected = this.layerData.isSelected; 446 this.isSelected = this.layerData.isSelected;
464 this.isActive = this.layerData.isActive; 447 this.isActive = this.layerData.isActive;
465 this.isStyleCollapsed = this.layerData.isStyleCollapsed; 448 this.isStyleCollapsed = this.layerData.isStyleCollapsed;
@@ -471,11 +454,12 @@ var Layer = exports.Layer = Montage.create(Component, {
471 this.dtextScaleX = this.layerData.dtextScaleX; 454 this.dtextScaleX = this.layerData.dtextScaleX;
472 this.dtextScaleY = this.layerData.dtextScaleY; 455 this.dtextScaleY = this.layerData.dtextScaleY;
473 this.dtextRotate = this.layerData.dtextRotate; 456 this.dtextRotate = this.layerData.dtextRotate;
474 this._isFirstDraw = this.layerData._isFirstDraw; 457 //this._isFirstDraw = this.layerData._isFirstDraw;
475 this.layerTag = this.layerData.layerTag; 458 this.layerTag = this.layerData.layerTag;
476 this.isVisible = this.layerData.isVisible; 459 this.isVisible = this.layerData.isVisible;