diff options
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index f9edfca6..f62d43a4 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -99,6 +99,20 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
99 | this.layerData.layerID = value; | 99 | this.layerData.layerID = value; |
100 | } | 100 | } |
101 | }, | 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; | ||
114 | } | ||
115 | }, | ||
102 | 116 | ||
103 | /* Position and Transform hottext values */ | 117 | /* Position and Transform hottext values */ |
104 | _dtextPositionX : { | 118 | _dtextPositionX : { |
@@ -290,9 +304,30 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
290 | }, | 304 | }, |
291 | set:function(value){ | 305 | set:function(value){ |
292 | this._isAnimated = value; | 306 | this._isAnimated = value; |
293 | this.layerData.isAnimated = newVal; | 307 | this.layerData.isAnimated = value; |
308 | } | ||
309 | }, | ||
310 | _isVisible:{ | ||
311 | value: true | ||
312 | }, | ||
313 | |||
314 | isVisible:{ | ||
315 | get:function(){ | ||
316 | return this._isVisible; | ||
317 | }, | ||
318 | set:function(value){ | ||
319 | if (this._isVisible !== value) { | ||
320 | this._isVisible = value; | ||
321 | if (value === true) { | ||
322 | this.element.classList.remove("layer-hidden"); | ||
323 | } else { | ||
324 | this.element.classList.add("layer-hidden"); | ||
325 | } | ||
326 | } | ||
327 | this.layerData.isVisible = value; | ||
294 | } | 328 | } |
295 | }, | 329 | }, |
330 | |||
296 | _justAdded: { | 331 | _justAdded: { |
297 | value: false | 332 | value: false |
298 | }, | 333 | }, |
@@ -433,6 +468,9 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
433 | this.dtextScaleY = this.layerData.dtextScaleY; | 468 | this.dtextScaleY = this.layerData.dtextScaleY; |
434 | this.dtextRotate = this.layerData.dtextRotate; | 469 | this.dtextRotate = this.layerData.dtextRotate; |
435 | this._isFirstDraw = this.layerData._isFirstDraw; | 470 | this._isFirstDraw = this.layerData._isFirstDraw; |
471 | this.layerTag = this.layerData.layerTag; | ||
472 | this.isVisible = this.layerData.isVisible; | ||
473 | this.isAnimated = this.layerData.isAnimated; | ||
436 | this.needsDraw = boolNeedsDraw; | 474 | this.needsDraw = boolNeedsDraw; |
437 | } | 475 | } |
438 | }, | 476 | }, |
@@ -504,6 +542,8 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
504 | this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); | 542 | this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); |
505 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); | 543 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); |
506 | this.element.addEventListener("drop", this.handleDrop.bind(this), false); | 544 | this.element.addEventListener("drop", this.handleDrop.bind(this), false); |
545 | |||
546 | // Bind this.layerTag to the tag | ||
507 | 547 | ||
508 | } | 548 | } |
509 | }, | 549 | }, |