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