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.js49
1 files changed, 45 insertions, 4 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 3bcc1401..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 },
@@ -710,13 +750,14 @@ var Layer = exports.Layer = Montage.create(Component, {
710 handleSelectorEditableBlur : { 750 handleSelectorEditableBlur : {
711 value: function(event) { 751 value: function(event) {
712 this.titleSelector.scrollLeft = 0; 752 this.titleSelector.scrollLeft = 0;
753 this.handleSelectorEditableChange(event);
713 } 754 }
714 }, 755 },
715 handleSelectorEditableChange: { 756 handleSelectorEditableChange: {
716 value: function(event) { 757 value: function(event) {
717 var newVal = "ONTD"; 758 var newVal = this._layerEditable.enteredValue;
718 if (this._layerEditable.value !== "") { 759 if (this._layerEditable.enteredValue.length === 0) {
719 newVal = this._layerEditable.value; 760 newVal = this._layerEditable._preEditValue;
720 } 761 }
721 this.dynamicLayerName.value = newVal; 762 this.dynamicLayerName.value = newVal;
722 this.layerName = newVal; 763 this.layerName = newVal;