aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKruti Shah2012-04-04 10:54:29 -0700
committerKruti Shah2012-04-04 10:54:29 -0700
commit59de13ed9f88497b07b4fdcf4d2c9d5c2bf05365 (patch)
tree5beefbd3837c23c21d2fe1d463e5fb2e467ce8a7
parent1ca98c8c69ea3ef28e8bc050326306424824296d (diff)
downloadninja-59de13ed9f88497b07b4fdcf4d2c9d5c2bf05365.tar.gz
Timeline: Saving layername
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js1
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js5
2 files changed, 6 insertions, 0 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index c69f28b0..300462ee 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -490,6 +490,7 @@ var Layer = exports.Layer = Montage.create(Component, {
490 }, false); 490 }, false);
491 this._layerEditable.addEventListener("change", function(event) { 491 this._layerEditable.addEventListener("change", function(event) {
492 that.dynamicLayerName.value = that._layerEditable.value; 492 that.dynamicLayerName.value = that._layerEditable.value;
493 this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = that.dynamicLayerName.value
493 that.needsDraw = true; 494 that.needsDraw = true;
494 }, false); 495 }, false);
495 this._layerEditable.editingClass = "editable2"; 496 this._layerEditable.editingClass = "editable2";
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index c454130c..0ca4800d 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -747,6 +747,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
747 747
748 this.currentLayerNumber = this.currentLayerNumber + 1; 748 this.currentLayerNumber = this.currentLayerNumber + 1;
749 newLayerName = "Layer " + this.currentLayerNumber; 749 newLayerName = "Layer " + this.currentLayerNumber;
750
751 if(ele.dataset.storedLayerName){
752 newLayerName = ele.dataset.storedLayerName;
753 }
750 thingToPush.layerData.layerName = newLayerName; 754 thingToPush.layerData.layerName = newLayerName;
751 thingToPush.layerData.layerID = this.currentLayerNumber; 755 thingToPush.layerData.layerID = this.currentLayerNumber;
752 thingToPush.parentElementUUID = this.hashKey; 756 thingToPush.parentElementUUID = this.hashKey;
@@ -787,6 +791,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
787 value:function() { 791 value:function() {
788 this.createNewLayer(); 792 this.createNewLayer();
789 this.currentLayerSelected.layerData.elementsList.push(this.application.ninja.selectedElements[0]._element); 793 this.currentLayerSelected.layerData.elementsList.push(this.application.ninja.selectedElements[0]._element);
794 this.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.currentLayerSelected.layerData.layerName;
790 } 795 }
791 }, 796 },
792 797