diff options
author | Jonathan Duran | 2012-05-14 10:53:20 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-14 10:53:20 -0700 |
commit | 8c464561e0c55dc5bf67e1e815678e0d07dc4727 (patch) | |
tree | 6b2f3f3e15b2da5747c20a9e8e0c9aac44b300ca /js/panels/Timeline/Layer.reel | |
parent | c16b2c6674a9170e1ef75a489e876808ba2f6c39 (diff) | |
download | ninja-8c464561e0c55dc5bf67e1e815678e0d07dc4727.tar.gz |
Squashed commit of the following:
commit b23502b8ed6856981d09577d4cf24283e5db8afa
Author: Kruti Shah <kruti.shah@motorola.com>
Date: Mon May 14 10:48:16 2012 -0700
Removed Debugger
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
commit c0b531a074e9cf9a964da0cda496bba8d7453ec1
Author: Kruti Shah <kruti.shah@motorola.com>
Date: Fri May 11 13:55:18 2012 -0700
Changing Doc Layer Name
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/Layer.reel')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 130dd044..b0f6d220 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -83,13 +83,13 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
83 | return this._layerName; | 83 | return this._layerName; |
84 | }, | 84 | }, |
85 | set:function(newVal){ | 85 | set:function(newVal){ |
86 | |||
87 | this._layerEditable.value = newVal; | 86 | this._layerEditable.value = newVal; |
88 | this._layerName = newVal; | 87 | this._layerName = newVal; |
89 | this.layerData.layerName = newVal; | 88 | this.layerData.layerName = newVal; |
90 | if (typeof(this.dynamicLayerName) !== "undefined") { | 89 | if (typeof(this.dynamicLayerName) !== "undefined") { |
91 | this.dynamicLayerName.value = newVal; | 90 | this.dynamicLayerName.value = newVal; |
92 | } | 91 | } |
92 | |||
93 | } | 93 | } |
94 | }, | 94 | }, |
95 | _layerID:{ | 95 | _layerID:{ |
@@ -485,6 +485,8 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
485 | this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); | 485 | this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); |
486 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); | 486 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); |
487 | this.element.addEventListener("drop", this.handleDrop.bind(this), false); | 487 | this.element.addEventListener("drop", this.handleDrop.bind(this), false); |
488 | |||
489 | this.eventManager.addEventListener("updatedID", this, false); | ||
488 | 490 | ||
489 | 491 | ||
490 | 492 | ||
@@ -668,11 +670,11 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
668 | 670 | ||
669 | /* Begin: Event handlers */ | 671 | /* Begin: Event handlers */ |
670 | handleLayerNameChange: { | 672 | handleLayerNameChange: { |
671 | value: function(event) { | 673 | value: function(event) { |
672 | this.dynamicLayerName.value = this._layerEditable.value; | 674 | this.dynamicLayerName.value = this._layerEditable.value; |
673 | this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.dynamicLayerName.value; | ||
674 | this.needsDraw = true; | 675 | this.needsDraw = true; |
675 | this.application.ninja.documentController.activeDocument.needsSave = true; | 676 | this.application.ninja.documentController.activeDocument.needsSave = true; |
677 | this.layerData.elementsList[0].setAttribute("id",this.dynamicLayerName.value); | ||
676 | } | 678 | } |
677 | }, | 679 | }, |
678 | handleAddStyleClick: { | 680 | handleAddStyleClick: { |
@@ -699,7 +701,6 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
699 | } | 701 | } |
700 | this.dynamicLayerName.value = newVal; | 702 | this.dynamicLayerName.value = newVal; |
701 | this.layerName = newVal; | 703 | this.layerName = newVal; |
702 | this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = newVal; | ||
703 | this.application.ninja.documentController.activeDocument.needsSave = true; | 704 | this.application.ninja.documentController.activeDocument.needsSave = true; |
704 | this.needsDraw = true; | 705 | this.needsDraw = true; |
705 | } | 706 | } |
@@ -845,7 +846,24 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
845 | return e.stack.split("at")[3].split(":")[2]; | 846 | return e.stack.split("at")[3].split(":")[2]; |
846 | } | 847 | } |
847 | } | 848 | } |
849 | }, | ||
850 | |||
851 | handleUpdatedID:{ | ||
852 | value:function(event){ | ||
853 | var i= this.application.ninja.timeline.arrLayers.length; | ||
854 | if(event.detail.id){ | ||
855 | for(var k=0;k<i;k++){ | ||
856 | if(this.application.ninja.timeline.arrLayers[k].layerData.layerID=== this.application.ninja.timeline.currentLayerSelected.layerData.layerID){ | ||
857 | this.application.ninja.timeline.currentLayerSelected.layerData.layerName = event.detail.id; | ||
858 | this.application.ninja.timeline.triggerLayerBinding(k); | ||
859 | this.needsDraw=true; | ||
860 | } | ||
861 | } | ||
862 | |||
863 | } | ||
864 | } | ||
848 | } | 865 | } |
866 | |||
849 | /* End: Logging routines */ | 867 | /* End: Logging routines */ |
850 | 868 | ||
851 | }); | 869 | }); |