diff options
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 3d31a50b..b0ab3b19 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -1211,63 +1211,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1211 | j = 0, | 1211 | j = 0, |
1212 | arrLayersLength = this.arrLayers.length, | 1212 | arrLayersLength = this.arrLayers.length, |
1213 | arrSelectedIndexesLength = arrSelectedIndexes.length, | 1213 | arrSelectedIndexesLength = arrSelectedIndexes.length, |
1214 | currentLayersSelectedLength = this.currentLayersSelected.length, | ||
1215 | boolContinue = false, | ||
1216 | arrSelectedLayers = false, | 1214 | arrSelectedLayers = false, |
1217 | arrCurrentElementsSelected = []; | 1215 | arrCurrentElementsSelected = []; |
1218 | var matchedValues = 0; | ||
1219 | |||
1220 | /* | ||
1221 | if (arrSelectedIndexesLength !== 0) { | ||
1222 | for(i=0;i<arrSelectedIndexesLength;i++){ | ||
1223 | for(j=0;j<currentLayersSelectedLength;j++){ | ||
1224 | |||
1225 | if(this.arrLayers[arrSelectedIndexes[i]] === this.arrLayers[this.currentLayerSelected[j]]){ | ||
1226 | matchedValues+=1; | ||
1227 | } | ||
1228 | } | ||
1229 | } | ||
1230 | |||
1231 | if(matchedValues === arrSelectedIndexesLength){ | ||
1232 | return; | ||
1233 | } | ||
1234 | } | ||
1235 | |||
1236 | if(this.arrLayers[arrSelectedIndexes[i]] === this.arrLayers[this.currentLayersSelected[j]]){ | ||
1237 | matchedValues+=1; | ||
1238 | } | ||
1239 | } | ||
1240 | } | ||
1241 | |||
1242 | |||
1243 | // TODO: this should probably check to see if it actually needs to run. | ||
1244 | |||
1245 | console.log(arrSelectedIndexes); | ||
1246 | console.log(this.currentLayersSelected); | ||
1247 | // Compare arrSelectedIndexes with this.currentLayersSelected | ||
1248 | // If the items are the same, we do not need to do anything. | ||
1249 | if (arrSelectedIndexesLength !== currentLayersSelectedLength) { | ||
1250 | // Different length in the arrays, we definitely need to continue. | ||
1251 | console.log('diferent length') | ||
1252 | boolContinue = true; | ||
1253 | } else { | ||
1254 | // Check each selected index and see if it's in this.currentLayersSelected | ||
1255 | // If we find one that isn't, we need to continue | ||
1256 | |||
1257 | for (i = 0; i < arrSelectedIndexesLength; i++) { | ||
1258 | console.log('checking for ', arrSelectedIndexes[i]); | ||
1259 | if (this.currentLayersSelected.indexOf(arrSelectedIndexes[i]) === -1) { | ||
1260 | // Ooops, one of them was not found. | ||
1261 | boolContinue = true; | ||
1262 | } | ||
1263 | } | ||
1264 | } | ||
1265 | if (boolContinue === false) { | ||
1266 | console.log('exiting') | ||
1267 | return; | ||
1268 | } | ||
1269 | */ | ||
1270 | |||
1271 | 1216 | ||
1272 | // Deselect selected layers if they're not in arrSelectedIndexes. | 1217 | // Deselect selected layers if they're not in arrSelectedIndexes. |
1273 | for (i = 0; i < arrLayersLength; i++) { | 1218 | for (i = 0; i < arrLayersLength; i++) { |
@@ -1278,7 +1223,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1278 | 1223 | ||
1279 | // Check to see if this layer, that we're deselecting, has | 1224 | // Check to see if this layer, that we're deselecting, has |
1280 | // any selected keyframes associated with it. If it does, deselect them. | 1225 | // any selected keyframes associated with it. If it does, deselect them. |
1281 | for (var j = 0; j < this.selectedTweens.length; j++) { | 1226 | for (j = 0; j < this.selectedTweens.length; j++) { |
1282 | var currentStageElement; | 1227 | var currentStageElement; |
1283 | if (typeof(this.selectedTweens[j].parentComponent.parentComponent.trackType) === "undefined") { | 1228 | if (typeof(this.selectedTweens[j].parentComponent.parentComponent.trackType) === "undefined") { |
1284 | currentStageElement = this.selectedTweens[j].parentComponent.parentComponent.stageElement; | 1229 | currentStageElement = this.selectedTweens[j].parentComponent.parentComponent.stageElement; |
@@ -1296,10 +1241,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1296 | if (this.currentLayersSelected !== false) { | 1241 | if (this.currentLayersSelected !== false) { |
1297 | this.currentLayersSelected = false; | 1242 | this.currentLayersSelected = false; |
1298 | } | 1243 | } |
1299 | |||
1300 | // Deselect tweens | ||
1301 | //this.deselectTweens(); | ||
1302 | |||
1303 | 1244 | ||
1304 | // If we are actually going to be selecting things, create an empty array to use | 1245 | // If we are actually going to be selecting things, create an empty array to use |
1305 | if (arrSelectedIndexesLength > 0) { | 1246 | if (arrSelectedIndexesLength > 0) { |