aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js77
1 files changed, 76 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 8c3b64eb..e55f583b 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -117,6 +117,19 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
117 } 117 }
118 }, 118 },
119 119
120 _currentLayersSelected:{
121 value:[]
122 },
123 currentLayersSelected:{
124 get:function () {
125 return this._currentLayersSelected;
126 },
127 set:function (newVal) {
128 this._currentLayersSelected = newVal;
129 this.cacheTimeline();
130 }
131 },
132
120 _millisecondsOffset:{ 133 _millisecondsOffset:{
121 value:1000 134 value:1000
122 }, 135 },
@@ -418,6 +431,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
418 this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; 431 this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer;
419 this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; 432 this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber;
420 this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; 433 this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected;
434 this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected;
421 } 435 }
422 } 436 }
423 }, 437 },
@@ -430,6 +444,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
430 this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; 444 this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer;
431 this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; 445 this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber;
432 this.application.ninja.currentDocument.tlCurrentLayerSelected = null; 446 this.application.ninja.currentDocument.tlCurrentLayerSelected = null;
447 this.application.ninja.currentDocument.tlCurrentLayersSelected = [];
433 } 448 }
434 }, 449 },
435 450
@@ -609,6 +624,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
609 this.arrLayers = this.application.ninja.currentDocument.tlArrLayers; 624 this.arrLayers = this.application.ninja.currentDocument.tlArrLayers;
610 this.currentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; 625 this.currentLayerNumber = this.application.ninja.currentDocument.tllayerNumber;
611 this.currentLayerSelected = this.application.ninja.currentDocument.tlCurrentLayerSelected; 626 this.currentLayerSelected = this.application.ninja.currentDocument.tlCurrentLayerSelected;
627 this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected;
612 628
613 629
614 //debugger; 630 //debugger;
@@ -772,8 +788,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
772 788
773 handleSelectionChange:{ 789 handleSelectionChange:{
774 value:function () { 790 value:function () {
775 var layerIndex, i = 0, arrLayersLength = this.arrLayers.length; 791 var layerIndex,
792 i = 0,
793 arrLayersLength = this.arrLayers.length;
794
776 this.deselectTweens(); 795 this.deselectTweens();
796
777 if (this.application.ninja.selectedElements.length === 1) { 797 if (this.application.ninja.selectedElements.length === 1) {
778 if (this.application.ninja.selectedElements[0]) { 798 if (this.application.ninja.selectedElements[0]) {
779 for (i = 0; i < arrLayersLength; i++) { 799 for (i = 0; i < arrLayersLength; i++) {
@@ -786,9 +806,64 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
786 } 806 }
787 } 807 }
788 } 808 }
809
810 if (this.application.ninja.selectedElements.length > 1) {
811
812 }
813 }
814 },
815
816
817
818 selectLayers:{
819 value:function (arrSelectedIndexes) {
820
821 var i = 0,
822 j = 0,
823 arrLayersLength = this.arrLayers.length,
824 userSelection = false;
825
826 if (this.selectedKeyframes) {
827 this.deselectTweens();
828 }
829
830 for (i = 0; i < arrLayersLength; i++) {
831 if (i === layerIndex) {
832 this.arrLayers[i].layerData.isSelected = true;
833 } else {
834 this.arrLayers[i].layerData.isSelected = false;
835 }
836
837 this.triggerLayerBinding(i);
838 }
839
840 this.layerRepetition.selectedIndexes = [layerIndex];
841 this.currentLayerSelected = this.arrLayers[layerIndex];
842 if (userSelection) {
843 if (this._captureSelection) {
844
845 if (this.currentLayerSelected.layerData.elementsList.length >= 1) {
846 this.application.ninja.selectionController.selectElements(this.currentLayerSelected.layerData.elementsList);
847 } else {
848 this.application.ninja.selectionController.executeSelectElement();
849 }
850
851 }
852 this._captureSelection = true;
853 }
854 this.resetMasterDuration();
789 } 855 }
790 }, 856 },
791 857
858
859
860
861
862
863
864
865
866
792 deselectTweens:{ 867 deselectTweens:{
793 value:function () { 868 value:function () {
794 for (var i = 0; i < this.selectedTweens.length; i++) { 869 for (var i = 0; i < this.selectedTweens.length; i++) {