aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js35
1 files changed, 22 insertions, 13 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 528d1fbf..3e82a760 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -557,16 +557,25 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
557 557
558 if(this.application.ninja.selectedElements[0]){ 558 if(this.application.ninja.selectedElements[0]){
559 559
560 // TODO - element uuid should be stored directly in layer array (possibly as the layerID) 560 for (var i = 0; i < this.arrLayers.length; i++) {
561 key = this.application.ninja.selectedElements[0].uuid; 561 if (this.application.ninja.selectedElements[0].uuid === this.arrLayers[i].layerData.elementsList[0].uuid) {
562 562 layerIndex = this.getLayerIndexByID(this.arrLayers[i].layerData.layerID);
563 switchSelectedLayer = this.hashElementMapToLayer.getItem(key); 563 this._captureSelection = false;
564 if(switchSelectedLayer!==undefined){ 564 this.selectLayer(layerIndex);
565 layerIndex = this.getLayerIndexByID(switchSelectedLayer.layerID); 565 this._captureSelection = true;
566 this._captureSelection=false; 566 }
567 this.selectLayer(layerIndex);
568 this._captureSelection=true;
569 } 567 }
568
569// // TODO - element uuid should be stored directly in layer array (possibly as the layerID)
570// key = this.application.ninja.selectedElements[0].uuid;
571//
572// switchSelectedLayer = this.hashElementMapToLayer.getItem(key);
573// if(switchSelectedLayer!==undefined){
574// layerIndex = this.getLayerIndexByID(switchSelectedLayer.layerID);
575// this._captureSelection=false;
576// this.selectLayer(layerIndex);
577// this._captureSelection=true;
578// }
570 } 579 }
571 } 580 }
572 }, 581 },
@@ -870,7 +879,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
870 handleElementAdded:{ 879 handleElementAdded:{
871 value:function (event) { 880 value:function (event) {
872 this.insertLayer(); 881 this.insertLayer();
873 console.log("inserting layer"); 882 //console.log("inserting layer");
874 883
875 this.addElementToLayer(this.application.ninja.selectedElements[0]); 884 this.addElementToLayer(this.application.ninja.selectedElements[0]);
876 } 885 }
@@ -880,9 +889,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
880 value:function (element) { 889 value:function (element) {
881 890
882 891
883 console.log("setting element to layer"); 892 //console.log("setting element to layer");
884 console.log(element); 893 //console.log(element);
885 console.log(this.currentLayerSelected.layerData); 894 //console.log(this.currentLayerSelected.layerData);
886 895
887 //element.uuid = nj.generateRandom(); 896 //element.uuid = nj.generateRandom();
888 897