diff options
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index a52150af..b771f6f3 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -119,14 +119,21 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
119 | value: function(event) { | 119 | value: function(event) { |
120 | event.dataTransfer.setData('Text', 'Keyframe'); | 120 | event.dataTransfer.setData('Text', 'Keyframe'); |
121 | var i = 0, | 121 | var i = 0, |
122 | tweenRepetitionLength = this.parentComponent.parentComponent.parentComponent.tweenRepetition.childComponents.length, | 122 | tweenRepetitionLength, |
123 | myTrack, | ||
123 | myIndex = null; | 124 | myIndex = null; |
125 | if (typeof(this.parentComponent.parentComponent.parentComponent.tweenRepetition) !== "undefined") { | ||
126 | myTrack = this.parentComponent.parentComponent.parentComponent; | ||
127 | } else { | ||
128 | myTrack = this.parentComponent.parentComponent.parentComponent.parentComponent.parentComponent.parentComponent.parentComponent; | ||
129 | } | ||
130 | tweenRepetitionLength = myTrack.tweenRepetition.childComponents.length; | ||
124 | for (i = 0; i < tweenRepetitionLength; i++) { | 131 | for (i = 0; i < tweenRepetitionLength; i++) { |
125 | if (this.parentComponent.parentComponent.parentComponent.tweenRepetition.childComponents[i].uuid === this.parentComponent.uuid) { | 132 | if (myTrack.tweenRepetition.childComponents[i].uuid === this.parentComponent.uuid) { |
126 | myIndex = i; | 133 | myIndex = i; |
127 | } | 134 | } |
128 | } | 135 | } |
129 | this.parentComponent.parentComponent.parentComponent.draggingIndex = myIndex; | 136 | myTrack.draggingIndex = myIndex; |
130 | this.selectKeyframe(); | 137 | this.selectKeyframe(); |
131 | } | 138 | } |
132 | }, | 139 | }, |