aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index b713a197..b8ab1539 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -480,31 +480,23 @@ var Layer = exports.Layer = Montage.create(Component, {
480 480
481 // Initialize myself 481 // Initialize myself
482 this.init(); 482 this.init();
483 var that = this; 483
484 // Make it editable! 484 // Make it editable!
485 this._layerEditable = Hintable.create(); 485 this._layerEditable = Hintable.create();
486 this._layerEditable.element = this.titleSelector; 486 this._layerEditable.element = this.titleSelector;
487 this.titleSelector.identifier = "selectorEditable"; 487 this.titleSelector.identifier = "selectorEditable";
488 this.titleSelector.addEventListener("click", this, false); 488 this.titleSelector.addEventListener("click", this, false);
489 this._layerEditable.addEventListener("blur", function(event) { 489 this._layerEditable.addEventListener("blur", this.handleSelectorEditableBlur.bind(this), false);
490 that.handleSelectorEditableBlur(event); 490 this._layerEditable.addEventListener("change", this.handleLayerNameChange.bind(this), false);
491 }, false);
492 this._layerEditable.addEventListener("change", function(event) {
493 that.dynamicLayerName.value = that._layerEditable.value;
494 this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = that.dynamicLayerName.value;
495 that.needsDraw = true;
496 this.application.ninja.documentController.activeDocument.needsSave = true;
497 }, false);
498 this._layerEditable.editingClass = "editable2"; 491 this._layerEditable.editingClass = "editable2";
499 this._layerEditable.value = this.layerName; 492 this._layerEditable.value = this.layerName;
500 //this._layerEditable.needsDraw = true; 493
501 494 // Collapser event handlers.
502 this.mainCollapser.clicker.addEventListener("click", this.handleMainCollapserClick.bind(this), false); 495 this.mainCollapser.clicker.addEventListener("click", this.handleMainCollapserClick.bind(this), false);
503 this.positionCollapser.clicker.addEventListener("click", this.handlePositionCollapserClick.bind(this), false); 496 this.positionCollapser.clicker.addEventListener("click", this.handlePositionCollapserClick.bind(this), false);
504 this.transformCollapser.clicker.addEventListener("click", this.handleTransformCollapserClick.bind(this), false); 497 this.transformCollapser.clicker.addEventListener("click", this.handleTransformCollapserClick.bind(this), false);
505 this.styleCollapser.clicker.addEventListener("click", this.handleStyleCollapserClick.bind(this), false); 498 this.styleCollapser.clicker.addEventListener("click", this.handleStyleCollapserClick.bind(this), false);
506 499
507
508 // Add event listeners to add and delete style buttons 500 // Add event listeners to add and delete style buttons
509 this.buttonAddStyle.addEventListener("click", this.handleAddStyleClick.bind(this), false); 501 this.buttonAddStyle.addEventListener("click", this.handleAddStyleClick.bind(this), false);
510 this.buttonDeleteStyle.addEventListener("click", this.handleDeleteStyleClick.bind(this), false); 502 this.buttonDeleteStyle.addEventListener("click", this.handleDeleteStyleClick.bind(this), false);
@@ -705,6 +697,14 @@ var Layer = exports.Layer = Montage.create(Component, {
705 /* End: Controllers */ 697 /* End: Controllers */
706 698
707 /* Begin: Event handlers */ 699 /* Begin: Event handlers */
700 handleLayerNameChange: {
701 value: function(event) {
702 this.dynamicLayerName.value = this._layerEditable.value;
703 this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.dynamicLayerName.value;
704 this.needsDraw = true;
705 this.application.ninja.documentController.activeDocument.needsSave = true;
706 }
707 },
708 handleAddStyleClick: { 708 handleAddStyleClick: {
709 value: function(event) { 709 value: function(event) {
710 this.addStyle(); 710 this.addStyle();