aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Keyframe.reel
diff options
context:
space:
mode:
authorKruti Shah2012-07-16 16:28:57 -0700
committerKruti Shah2012-07-16 16:28:57 -0700
commit7e2c2dbd040ed79a3f0678f91bd4b6db9cf69231 (patch)
treea1c0985f584273990dcacdfaf9aeaddeb583d0b1 /js/panels/Timeline/Keyframe.reel
parentcdcc677c827b65e3c689d4207c0117f94e4d6d57 (diff)
parent33e54da07d024ece1d52041d4ed2bcc28b8cbca3 (diff)
downloadninja-7e2c2dbd040ed79a3f0678f91bd4b6db9cf69231.tar.gz
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel')
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js
index a52150af..13902ddb 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 },
@@ -151,7 +158,7 @@ var Keyframe = exports.Keyframe = Montage.create(Component, {
151 return; 158 return;
152 } 159 }
153 this.isSelected=true; 160 this.isSelected=true;
154 this.element.style.left = (this.position - 6) + "px"; 161 //this.element.style.left = (this.position - 6) + "px"; Moved to draw cycle.
155 this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty; 162 this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty;
156 this.parentComponent.selectTween(); 163 this.parentComponent.selectTween();
157 } 164 }
@@ -160,7 +167,7 @@ var Keyframe = exports.Keyframe = Montage.create(Component, {
160 deselectKeyframe:{ 167 deselectKeyframe:{
161 value:function () { 168 value:function () {
162 this.isSelected = false; 169 this.isSelected = false;
163 this.element.style.left = (this.position - 5) + "px"; 170 // this.element.style.left = (this.position - 5) + "px"; Moved to draw cycle
164 } 171 }
165 } 172 }
166 // ==== End Controllers 173 // ==== End Controllers