aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
authorJonathan Duran2012-06-26 16:56:17 -0700
committerJonathan Duran2012-06-26 16:56:17 -0700
commit3b1bc2e5b3060b74853d40e4ec7c116faaa462c6 (patch)
treeade892c3043f89238ac6ff30b8d7a88459d9ac8d /js/panels/Timeline/TimelinePanel.reel
parentbdeedb6c37212b4991b5f492ce665361997dd8e6 (diff)
parent45a5deac8ee1e38a6835275230f947b6aa8fb62a (diff)
downloadninja-3b1bc2e5b3060b74853d40e4ec7c116faaa462c6.tar.gz
Merge branch 'refs/heads/timeline-local' into TimelineUber
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js34
1 files changed, 30 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 4185e54a..af358468 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -1090,10 +1090,36 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1090 var tempEv = {}; 1090 var tempEv = {};
1091 tempEv.offsetX = this.playheadmarker.offsetLeft; 1091 tempEv.offsetX = this.playheadmarker.offsetLeft;
1092 tempEv.actionType = action; 1092 tempEv.actionType = action;
1093 if (typeof(this.trackRepetition.childComponents[this.currentLayersSelected[0]]) !== "undefined") { 1093
1094 this.trackRepetition.childComponents[this.currentLayersSelected[0]].handleKeyboardShortcut(tempEv); 1094 if (this.currentLayersSelected === false) {
1095 } else { 1095 // oops, we do not have a layer selected. We should growl at the user. For now, this will fail silently.
1096 // oops, we do not have a layer selected. We should growl at the user. For now, this will fail silently. 1096 return;
1097 }
1098
1099 // Okay. We need to get the correct layer(s). For each currentElementSelected,
1100 // loop through trackRepetition.childComponents and compare to stageElement.
1101 // If they match, that's one of the components that needs the event.
1102 var i = 0,
1103 j = 0,
1104 currentElementsSelectedLength = this.currentElementsSelected.length,
1105 trackRepLength = this.trackRepetition.childComponents.length,
1106 arrTargetIndexes = [],
1107 arrTargetIndexesLength = 0;
1108
1109
1110 for (i = 0; i < trackRepLength; i++) {
1111 var currentElement = this.trackRepetition.childComponents[i].stageElement;
1112 for (j = 0; j < currentElementsSelectedLength; j++) {
1113 if (currentElement === this.currentElementsSelected[j]) {
1114 arrTargetIndexes.push(i);
1115 }
1116 }
1117 }
1118 arrTargetIndexesLength = arrTargetIndexes.length;
1119
1120 // Now we have an array of things that need to handle the event.
1121 for (i = 0; i < arrTargetIndexesLength; i++) {
1122 this.trackRepetition.childComponents[arrTargetIndexes[i]].handleKeyboardShortcut(tempEv);
1097 } 1123 }
1098 } 1124 }
1099 }, 1125 },