aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel/Layer.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-04-27 14:19:36 -0700
committerValerio Virgillito2012-04-27 14:19:36 -0700
commit314709dd189807bfc762aa150bb1b29d2ccdf25b (patch)
tree94a2b7a9c3e89173d3fb39246485bae46cf0f23a /js/panels/Timeline/Layer.reel/Layer.js
parent917668dbd753d69b346cb9fd2e665fbe257f5311 (diff)
parent69dba9ace7a1b77f57ee418abfc2e0fd0e0a9896 (diff)
downloadninja-314709dd189807bfc762aa150bb1b29d2ccdf25b.tar.gz
Merge pull request #181 from imix23ways/TimelineUber
Timeline uber
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js338
1 files changed, 244 insertions, 94 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 5206ae16..f2e20d41 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,8 +96,49 @@ 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;
100 }
101 },
102 _layerTag:{
103 value: "tag"
104 },
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;
105 } 114 }
106 }, 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 },
128
129
130 _elementsList : {
131 value: []
132 },
133 elementsList : {
134 serializable: true,
135 get: function() {
136 return this._elementsList;
137 },
138 set: function(newVal) {
139 this._elementsList = newVal;
140 }
141 },
107 142
108 /* Position and Transform hottext values */ 143 /* Position and Transform hottext values */
109 _dtextPositionX : { 144 _dtextPositionX : {
@@ -119,7 +154,7 @@ var Layer = exports.Layer = Montage.create(Component, {
119 set:function(value){ 154 set:function(value){
120 if (this._dtextPositionX !== value) { 155 if (this._dtextPositionX !== value) {
121 this._dtextPositionX = value; 156 this._dtextPositionX = value;
122 //this.needsDraw = true; 157 this.layerData.dtextPositionX = value;
123 } 158 }
124 159
125 } 160 }
@@ -138,7 +173,7 @@ var Layer = exports.Layer = Montage.create(Component, {
138 set:function(value){ 173 set:function(value){
139 if (this._dtextPositionY !== value) { 174 if (this._dtextPositionY !== value) {
140 this._dtextPositionY = value; 175 this._dtextPositionY = value;
141 //this.needsDraw = true; 176 this.layerData.dtextPositionY = value;
142 } 177 }
143 178
144 } 179 }
@@ -157,7 +192,7 @@ var Layer = exports.Layer = Montage.create(Component, {
157 set:function(value){ 192 set:function(value){
158 if (this._dtextScaleX !== value) { 193 if (this._dtextScaleX !== value) {
159 this._dtextScaleX = value; 194 this._dtextScaleX = value;
160 //this.needsDraw = true; 195 this.layerData.dtextScaleX = value;
161 } 196 }
162 197
163 } 198 }
@@ -176,7 +211,7 @@ var Layer = exports.Layer = Montage.create(Component, {
176 set:function(value){ 211 set:function(value){
177 if (this._dtextScaleY !== value) { 212 if (this._dtextScaleY !== value) {
178 this._dtextScaleY = value; 213 this._dtextScaleY = value;
179 //this.needsDraw = true; 214 this.layerData.dtextScaleY = value;
180 } 215 }
181 216
182 } 217 }
@@ -195,7 +230,7 @@ var Layer = exports.Layer = Montage.create(Component, {
195 set:function(value){ 230 set:function(value){
196 if (this._dtextSkewX !== value) { 231 if (this._dtextSkewX !== value) {
197 this._dtextSkewX = value; 232 this._dtextSkewX = value;
198 //this.needsDraw = true; 233 this.layerData.dtextSkewX = value;
199 } 234 }
200 235
201 } 236 }
@@ -214,7 +249,7 @@ var Layer = exports.Layer = Montage.create(Component, {
214 set:function(value){ 249 set:function(value){
215 if (this._dtextSkewY !== value) { 250 if (this._dtextSkewY !== value) {
216 this._dtextSkewY = value; 251 this._dtextSkewY = value;
217 //this.needsDraw = true; 252 this.layerData.dtextSkewY = value;
218 } 253 }
219 254
220 } 255 }
@@ -233,7 +268,7 @@ var Layer = exports.Layer = Montage.create(Component, {
233 set:function(value){ 268 set:function(value){
234 if (this._dtextRotate !== value) { 269 if (this._dtextRotate !== value) {
235 this._dtextRotate = value; 270 this._dtextRotate = value;
236 //this.needsDraw = true; 271 this.layerData.dtextRotate = value;
237 } 272 }
238 273
239 } 274 }
@@ -278,6 +313,7 @@ var Layer = exports.Layer = Montage.create(Component, {
278 }, 313 },
279 set: function(newVal) { 314 set: function(newVal) {
280 this._isActive = newVal; 315 this._isActive = newVal;
316 this.layerData.isActive = newVal;
281 } 317 }
282 }, 318 },
283 319
@@ -294,8 +330,30 @@ var Layer = exports.Layer = Montage.create(Component, {
294 }, 330 },
295 set:function(value){ 331 set:function(value){
296 this._isAnimated = value; 332 this._isAnimated = value;
333 this.layerData.isAnimated = value;
297 } 334 }
298 }, 335 },
336 _isVisible:{
337 value: true
338 },
339
340 isVisible:{
341 get:function(){
342 return this._isVisible;
343 },
344 set:function(value){
345 if (this._isVisible !== value) {
346 this._isVisible = value;
347 if (value === true) {
348 this.element.classList.remove("layer-hidden");
349 } else {
350 this.element.classList.add("layer-hidden");
351 }
352 }
353 this.layerData.isVisible = value;
354 }
355 },
356
299 _justAdded: { 357 _justAdded: {
300 value: false