aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJon Reid2012-04-26 14:26:19 -0700
committerJon Reid2012-04-26 14:26:19 -0700
commite46547fe0a2d0c24c7b929588dbf0b66f9fe6533 (patch)
treea4a1aaed47bf23084d3f7f821ff47af5d69d249b /js
parent3cd248cdeca58effab83373edcb64aa2dac4c9b4 (diff)
downloadninja-e46547fe0a2d0c24c7b929588dbf0b66f9fe6533.tar.gz
Timeline: Deleting elements now deletes associated layers.
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 7d5b44a8..22938407 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -1042,16 +1042,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1042 }, 1042 },
1043 1043
1044 deleteLayer:{ 1044 deleteLayer:{
1045 value:function (elements) { 1045 value:function (arrElements) {
1046 // Only delete a selected layer. If no layer is selected, do nothing. 1046 // Only delete a selected layers. If no layers are selected, do nothing.
1047 var i = 0, 1047 var i = 0,
1048 arrLayersLength = this.arrLayers.length; 1048 arrLayers = document.querySelectorAll(".container-layers .container-layer"),
1049 //debugger; 1049 arrLayersLength = arrLayers.length;
1050 for (i = 0; i < arrLayersLength; i++) { 1050
1051 if (this.arrLayers[i].isSelected === true) { 1051 for (i = arrLayersLength -1; i >= 0; i--) {
1052 if (arrLayers[i].classList.contains("selected")) {
1052 this.arrLayers.splice(i, 1); 1053 this.arrLayers.splice(i, 1);
1053 } 1054 }
1054
1055 } 1055 }
1056 1056
1057 this.currentLayerSelected = false; 1057 this.currentLayerSelected = false;