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.js323
1 files changed, 229 insertions, 94 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 5206ae16..baf01def 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,9 +96,35 @@ 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 },
102 _layerTag:{
103 value: "tag"
104 },
107 105
106 layerTag:{
107 serializable: true,
108 get:function(){
109 return this._layerTag;
110 },
111 set:function(newVal){
112 this._layerTag = newVal;
113 this.layerData.layerTag = newVal;
114 }
115 },
116 _docUUID : {
117 value: null
118 },
119 docUUID : {
120 serializable: true,
121 get: function() {
122 return this._docUUID;
123 },
124 set: function(newVal) {
125 this._docUUID = newVal;
126 }
127 },
108 /* Position and Transform hottext values */ 128 /* Position and Transform hottext values */
109 _dtextPositionX : { 129 _dtextPositionX : {
110 value:null, 130 value:null,
@@ -119,7 +139,7 @@ var Layer = exports.Layer = Montage.create(Component, {
119 set:function(value){ 139 set:function(value){
120 if (this._dtextPositionX !== value) { 140 if (this._dtextPositionX !== value) {
121 this._dtextPositionX = value; 141 this._dtextPositionX = value;
122 //this.needsDraw = true; 142 this.layerData.dtextPositionX = value;
123 } 143 }
124 144
125 } 145 }
@@ -138,7 +158,7 @@ var Layer = exports.Layer = Montage.create(Component, {
138 set:function(value){ 158 set:function(value){
139 if (this._dtextPositionY !== value) { 159 if (this._dtextPositionY !== value) {
140 this._dtextPositionY = value; 160 this._dtextPositionY = value;
141 //this.needsDraw = true; 161 this.layerData.dtextPositionY = value;
142 } 162 }
143 163
144 } 164 }
@@ -157,7 +177,7 @@ var Layer = exports.Layer = Montage.create(Component, {
157 set:function(value){ 177 set:function(value){
158 if (this._dtextScaleX !== value) { 178 if (this._dtextScaleX !== value) {
159 this._dtextScaleX = value; 179 this._dtextScaleX = value;
160 //this.needsDraw = true; 180 this.layerData.dtextScaleX = value;
161 } 181 }
162 182
163 } 183 }
@@ -176,7 +196,7 @@ var Layer = exports.Layer = Montage.create(Component, {
176 set:function(value){ 196 set:function(value){
177 if (this._dtextScaleY !== value) { 197 if (this._dtextScaleY !== value) {
178 this._dtextScaleY = value; 198 this._dtextScaleY = value;
179 //this.needsDraw = true; 199 this.layerData.dtextScaleY = value;
180 } 200 }
181 201
182 } 202 }
@@ -195,7 +215,7 @@ var Layer = exports.Layer = Montage.create(Component, {
195 set:function(value){ 215 set:function(value){
196 if (this._dtextSkewX !== value) { 216 if (this._dtextSkewX !== value) {
197 this._dtextSkewX = value; 217 this._dtextSkewX = value;
198 //this.needsDraw = true; 218 this.layerData.dtextSkewX = value;
199 } 219 }
200 220
201 } 221 }
@@ -214,7 +234,7 @@ var Layer = exports.Layer = Montage.create(Component, {
214 set:function(value){ 234 set:function(value){
215 if (this._dtextSkewY !== value) { 235 if (this._dtextSkewY !== value) {
216 this._dtextSkewY = value; 236 this._dtextSkewY = value;
217 //this.needsDraw = true; 237 this.layerData.dtextSkewY = value;
218 } 238 }
219 239
220 } 240 }
@@ -233,7 +253,7 @@ var Layer = exports.Layer = Montage.create(Component, {
233 set:function(value){ 253 set:function(value){
234 if (this._dtextRotate !== value) { 254 if (this._dtextRotate !== value) {
235 this._dtextRotate = value; 255 this._dtextRotate = value;
236 //this.needsDraw = true; 256 this.layerData.dtextRotate = value;
237 } 257 }
238 258
239 } 259 }
@@ -278,6 +298,7 @@ var Layer = exports.Layer = Montage.create(Component, {
278 }, 298 },
279 set: function(newVal) { 299 set: function(newVal) {
280 this._isActive = newVal; 300 this._isActive = newVal;
301 this.layerData.isActive = newVal;
281 } 302 }
282 }, 303 },
283 304
@@ -294,8 +315,30 @@ var Layer = exports.Layer = Montage.create(Component, {
294 }, 315 },
295 set:function(value){ 316 set:function(value){
296 this._isAnimated = value; 317 this._isAnimated = value;
318 this.layerData.isAnimated = value;
319 }
320 },
321 _isVisible:{
322 value: true
323 },
324
325 isVisible:{
326 get:function(){
327 return this._isVisible;
328 },
329 set:function(value){
330 if (this._isVisible !== value) {
331 this._isVisible = value;
332 if (value === true) {
333 this.element.classList.remove("layer-hidden");
334 } else {
335 this.element.classList.add("layer-hidden");
336 }
337 }
338 this.layerData.isVisible = value;
297 } 339 }
298 }, 340 },
341
299 _justAdded: { 342 _justAdded: {
300 value: false 343 value: false
301 }, 344 },
@@ -314,10 +357,9 @@ var Layer = exports.Layer = Montage.create(Component, {
314 return this._isMainCollapsed; 357 return this._isMainCollapsed;
315 }, 358 },
316 set: function(newVal) { 359 set: function(newVal) {
317 this.log('layer.js: isMainCollapsed: ' + newVal); 360 this._isMainCollapsed = newVal;
318 if (newVal !== this._isMainCollapsed) { 361 this.layerData.isMainCollapsed = newVal;
319 this._isMainCollapsed = newVal; 362
320 }
321 } 363 }
322 }, 364 },
323 365
@@ -331,10 +373,8 @@ var Layer = exports.Layer = Montage.create(Component, {
331 return this._isTransformCollapsed; 373