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/TimelinePanel.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/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 8859e115..7f4fee89 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -402,7 +402,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
402 | } | 402 | } |
403 | }, | 403 | }, |
404 | 404 | ||
405 | draw: { | 405 | draw:{ |
406 | value: function() { | 406 | value: function() { |
407 | 407 | ||
408 | // Drag and Drop: | 408 | // Drag and Drop: |
@@ -568,8 +568,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
568 | // Bind all document-specific events (pass in true to unbind) | 568 | // Bind all document-specific events (pass in true to unbind) |
569 | _bindDocumentEvents : { | 569 | _bindDocumentEvents : { |
570 | value: function(boolUnbind) { | 570 | value: function(boolUnbind) { |
571 | var arrEvents = ["deleteLayerClick", | 571 | var arrEvents = [ "newLayer", |
572 | "newLayer", | ||
573 | "deleteLayer", | 572 | "deleteLayer", |
574 | "elementAdded", | 573 | "elementAdded", |
575 | "elementsRemoved", | 574 | "elementsRemoved", |
@@ -1014,7 +1013,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1014 | 1013 | ||
1015 | // Make up a layer name. | 1014 | // Make up a layer name. |
1016 | this.currentLayerNumber = this.currentLayerNumber + 1; | 1015 | this.currentLayerNumber = this.currentLayerNumber + 1; |
1017 | newLayerName = "Layer " + this.currentLayerNumber; | 1016 | // newLayerName = "Layer " + this.currentLayerNumber; |
1017 | newLayerName=" "; | ||
1018 | 1018 | ||
1019 | // Possibly currentLayerNumber doesn't correctly reflect the | 1019 | // Possibly currentLayerNumber doesn't correctly reflect the |
1020 | // number of layers. Check that. | 1020 | // number of layers. Check that. |
@@ -1074,12 +1074,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1074 | var newLayerName, thingToPush = this.createLayerTemplate(); | 1074 | var newLayerName, thingToPush = this.createLayerTemplate(); |
1075 | 1075 | ||
1076 | this.currentLayerNumber = this.currentLayerNumber + 1; | 1076 | this.currentLayerNumber = this.currentLayerNumber + 1; |
1077 | newLayerName = "Layer " + this.currentLayerNumber; | 1077 | // newLayerName = "Layer " + this.currentLayerNumber; |
1078 | 1078 | ||
1079 | if(ele.dataset.storedLayerName){ | 1079 | // if(ele.dataset.storedLayerName){ |
1080 | newLayerName = ele.dataset.storedLayerName; | 1080 | // newLayerName = ele.dataset.storedLayerName; |
1081 | // } | ||
1082 | if(ele.id){ | ||
1083 | thingToPush.layerData.layerName = ele.id; | ||
1081 | } | 1084 | } |
1082 | thingToPush.layerData.layerName = newLayerName; | ||
1083 | thingToPush.layerData.layerID = this.currentLayerNumber; | 1085 | thingToPush.layerData.layerID = this.currentLayerNumber; |
1084 | thingToPush.layerData.layerTag = "<" + ele.nodeName.toLowerCase() + ">"; | 1086 | thingToPush.layerData.layerTag = "<" + ele.nodeName.toLowerCase() + ">"; |
1085 | thingToPush.parentElement = this.application.ninja.currentSelectedContainer; | 1087 | thingToPush.parentElement = this.application.ninja.currentSelectedContainer; |
@@ -1170,7 +1172,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1170 | this.currentLayerSelected.layerData.elementsList = []; | 1172 | this.currentLayerSelected.layerData.elementsList = []; |
1171 | } | 1173 | } |
1172 | this.currentLayerSelected.layerData.elementsList.push(this.application.ninja.selectedElements[0]); | 1174 | this.currentLayerSelected.layerData.elementsList.push(this.application.ninja.selectedElements[0]); |
1173 | this.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.currentLayerSelected.layerData.layerName; | 1175 | // this.currentLayerSelected.layerData.elementsList[0].dataset.storedLayerName = this.currentLayerSelected.layerData.layerName; |
1174 | } | 1176 | } |
1175 | }, | 1177 | }, |
1176 | 1178 | ||
@@ -1178,7 +1180,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1178 | value:function (event) { | 1180 | value:function (event) { |
1179 | var deleteElements = event.detail; | 1181 | var deleteElements = event.detail; |
1180 | //console.log("TimelinePanel.handleElementsRemoved; event.detail is ", event.detail); | 1182 | //console.log("TimelinePanel.handleElementsRemoved; event.detail is ", event.detail); |
1181 | //debugger; | ||
1182 | this.deleteLayer(deleteElements); | 1183 | this.deleteLayer(deleteElements); |
1183 | } | 1184 | } |
1184 | }, | 1185 | }, |