From 8c464561e0c55dc5bf67e1e815678e0d07dc4727 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 14 May 2012 10:53:20 -0700 Subject: Squashed commit of the following: commit b23502b8ed6856981d09577d4cf24283e5db8afa Author: Kruti Shah Date: Mon May 14 10:48:16 2012 -0700 Removed Debugger Signed-off-by: Kruti Shah commit c0b531a074e9cf9a964da0cda496bba8d7453ec1 Author: Kruti Shah Date: Fri May 11 13:55:18 2012 -0700 Changing Doc Layer Name Signed-off-by: Kruti Shah Signed-off-by: Jonathan Duran --- js/panels/Timeline/Layer.reel/Layer.js | 26 ++++++++++++++++++---- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 21 ++++++++--------- 2 files changed, 33 insertions(+), 14 deletions(-) (limited to 'js/panels/Timeline') 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, { return this._layerName; }, set:function(newVal){ - this._layerEditable.value = newVal; this._layerName = newVal; this.layerData.layerName = newVal; if (typeof(this.dynamicLayerName) !== "undefined") { this.dynamicLayerName.value = newVal; } + } }, _layerID:{ @@ -485,6 +485,8 @@ var Layer = exports.Layer = Montage.create(Component, { this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); this.element.addEventListener("drop", this.handleDrop.bind(this), false); + + this.eventManager.addEventListener("updatedID", this, false); @@ -668,11 +670,11 @@ var Layer = exports.Layer = Montage.create(Component, { /* Begin: Event handlers */ handleLayerNameChange: { - value: function(event) { + value: function(event) { this.dynamicLayerName.value = this._layerEditable.value; - this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.dynamicLayerName.value; this.needsDraw = true; this.application.ninja.documentController.activeDocument.needsSave = true; + this.layerData.elementsList[0].setAttribute("id",this.dynamicLayerName.value); } }, handleAddStyleClick: { @@ -699,7 +701,6 @@ var Layer = exports.Layer = Montage.create(Component, { } this.dynamicLayerName.value = newVal; this.layerName = newVal; - this.application.ninja.timeline.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = newVal; this.application.ninja.documentController.activeDocument.needsSave = true; this.needsDraw = true; } @@ -845,7 +846,24 @@ var Layer = exports.Layer = Montage.create(Component, { return e.stack.split("at")[3].split(":")[2]; } } + }, + + handleUpdatedID:{ + value:function(event){ + var i= this.application.ninja.timeline.arrLayers.length; + if(event.detail.id){ + for(var k=0;k"; thingToPush.parentElement = this.application.ninja.currentSelectedContainer; @@ -1170,7 +1172,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.currentLayerSelected.layerData.elementsList = []; } this.currentLayerSelected.layerData.elementsList.push(this.application.ninja.selectedElements[0]); - this.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.currentLayerSelected.layerData.layerName; +// this.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.currentLayerSelected.layerData.layerName; } }, @@ -1178,7 +1180,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { value:function (event) { var deleteElements = event.detail; //console.log("TimelinePanel.handleElementsRemoved; event.detail is ", event.detail); - //debugger; this.deleteLayer(deleteElements); } }, -- cgit v1.2.3