diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 87e7bd2e..3b6db82e 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -732,6 +732,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
732 | this.application.ninja.currentDocument.tlCurrentLayerSelected = false; | 732 | this.application.ninja.currentDocument.tlCurrentLayerSelected = false; |
733 | this.application.ninja.currentDocument.tlCurrentLayersSelected = false; | 733 | this.application.ninja.currentDocument.tlCurrentLayersSelected = false; |
734 | this.application.ninja.currentDocument.tlCurrentElementsSelected = []; | 734 | this.application.ninja.currentDocument.tlCurrentElementsSelected = []; |
735 | this.application.ninja.currentDocument.lockedElements = []; | ||
735 | } | 736 | } |
736 | }, | 737 | }, |
737 | 738 | ||
@@ -1119,20 +1120,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1119 | 1120 | ||
1120 | // Deselect selected layers if they're not in arrSelectedIndexes. | 1121 | // Deselect selected layers if they're not in arrSelectedIndexes. |
1121 | for (i = 0; i < arrLayersLength; i++) { | 1122 | for (i = 0; i < arrLayersLength; i++) { |
1122 | |||
1123 | debugger; | ||
1124 | if([i]===arrSelectedIndexes){ | ||
1125 | if(this.arrLayers[i].layerData.isLock){ | ||
1126 | this.arrLayers[i].layerData.isSelected = false; | ||
1127 | }else{ | ||
1128 | this.arrLayers[i].layerData.isSelected = true; | ||
1129 | } | ||
1130 | }else{ | ||
1131 | this.arrLayers[i].layerData.isSelected = false; | ||
1132 | } | ||
1133 | if (this.arrLayers[i].layerData.isSelected === true) { | 1123 | if (this.arrLayers[i].layerData.isSelected === true) { |
1134 | if (arrSelectedIndexes.indexOf(i) < 0) { | 1124 | if (arrSelectedIndexes.indexOf(i) < 0) { |
1135 | |||
1136 | this.arrLayers[i].layerData.isSelected = false; | 1125 | this.arrLayers[i].layerData.isSelected = false; |
1137 | this.triggerLayerBinding(i); | 1126 | this.triggerLayerBinding(i); |
1138 | } | 1127 | } |
@@ -1150,11 +1139,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1150 | // Loop through arrLayers and do the selection. | 1139 | // Loop through arrLayers and do the selection. |
1151 | for (i = 0; i < arrLayersLength; i++) { | 1140 | for (i = 0; i < arrLayersLength; i++) { |
1152 | if (arrSelectedIndexes.indexOf(i) > -1) { | 1141 | if (arrSelectedIndexes.indexOf(i) > -1) { |
1153 | this.arrLayers[i].layerData.isSelected = true; | 1142 | if(!this.arrLayers[i].layerData.isLock){ |
1154 | this.arrLayers[i].isSelected = true; | 1143 | this.arrLayers[i].layerData.isSelected = true; |
1155 | this.triggerLayerBinding(i); | 1144 | this.arrLayers[i].isSelected = true; |
1156 | arrSelectedLayers.push(i); | 1145 | this.triggerLayerBinding(i); |
1157 | arrCurrentElementsSelected.push(this.arrLayers[i].layerData.stageElement); | 1146 | arrSelectedLayers.push(i); |
1147 | arrCurrentElementsSelected.push(this.arrLayers[i].layerData.stageElement); | ||
1148 | }else{ | ||
1149 | this.arrLayers[i].layerData.isSelected = false; | ||
1150 | this.triggerLayerBinding(i); | ||
1151 | } | ||
1158 | } | 1152 | } |
1159 | } | 1153 | } |
1160 | 1154 | ||
@@ -1732,8 +1726,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1732 | value:function(event){ | 1726 | value:function(event){ |
1733 | 1727 | ||
1734 | var arrLayersLength = this.arrLayers.length; | 1728 | var arrLayersLength = this.arrLayers.length; |
1735 | console.log(this.application.ninja.currentDocument) | ||
1736 | debugger; | ||
1737 | var lockElementArrLength = this.application.ninja.currentDocument.lockedElements.length; | 1729 | var lockElementArrLength = this.application.ninja.currentDocument.lockedElements.length; |
1738 | var i = 0; | 1730 | var i = 0; |
1739 | 1731 | ||
@@ -1767,7 +1759,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1767 | 1759 | ||
1768 | handleLayerVisibleClick:{ | 1760 | handleLayerVisibleClick:{ |
1769 | value:function(event){ | 1761 | value:function(event){ |
1770 | |||
1771 | var arrLayersLength = this.arrLayers.length; | 1762 | var arrLayersLength = this.arrLayers.length; |
1772 | var lockElementArrLength = this.application.ninja.currentDocument.lockedElements.length; | 1763 | var lockElementArrLength = this.application.ninja.currentDocument.lockedElements.length; |
1773 | var i = 0; | 1764 | var i = 0; |
@@ -1776,7 +1767,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1776 | event.currentTarget.classList.remove("checked"); | 1767 | event.currentTarget.classList.remove("checked"); |
1777 | for(i = 0; i < arrLayersLength; i++){ | 1768 | for(i = 0; i < arrLayersLength; i++){ |
1778 | this.arrLayers[i].layerData.isHidden = false; | 1769 | this.arrLayers[i].layerData.isHidden = false; |
1779 | this.arrLayers[i].layerData.elementsList[0].style.visibility = "visible"; | 1770 | this.arrLayers[i].layerData.stageElement.style.visibility = "visible"; |
1780 | for(var k=0;k<lockElementArrLength;k++){ | 1771 | for(var k=0;k<lockElementArrLength;k++){ |
1781 | if(this.application.ninja.currentDocument.lockedElements[k] === this.application.ninja.timeline.arrLayers[i].layerData.stageElement){ | 1772 | if(this.application.ninja.currentDocument.lockedElements[k] === this.application.ninja.timeline.arrLayers[i].layerData.stageElement){ |
1782 | this.application.ninja.currentDocument.lockedElements.splice(k,1); | 1773 | this.application.ninja.currentDocument.lockedElements.splice(k,1); |
@@ -1789,7 +1780,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1789 | for(i = 0; i < arrLayersLength; i++){ | 1780 | for(i = 0; i < arrLayersLength; i++){ |
1790 | if(!this.arrLayers[i].layerData.isHidden){ | 1781 | if(!this.arrLayers[i].layerData.isHidden){ |
1791 | this.arrLayers[i].layerData.isHidden = true; | 1782 | this.arrLayers[i].layerData.isHidden = true; |
1792 | this.arrLayers[i].layerData.elementsList[0].style.visibility = "hidden"; | 1783 | this.arrLayers[i].layerData.stageElement.style.visibility = "hidden"; |
1793 | this.application.ninja.currentDocument.lockedElements.push(this.arrLayers[i].layerData.stageElement); | 1784 | this.application.ninja.currentDocument.lockedElements.push(this.arrLayers[i].layerData.stageElement); |
1794 | } | 1785 | } |
1795 | 1786 | ||