diff options
author | Jon Reid | 2012-07-16 15:38:59 -0700 |
---|---|---|
committer | Jon Reid | 2012-07-16 15:38:59 -0700 |
commit | 33e54da07d024ece1d52041d4ed2bcc28b8cbca3 (patch) | |
tree | 6ee15621fc8aa4dde515beeef447a33cc1ab421b /js/panels | |
parent | aa13b63108d8f4f03af26abe2baa534f24d99192 (diff) | |
download | ninja-33e54da07d024ece1d52041d4ed2bcc28b8cbca3.tar.gz |
Timeline: Ameliorate slowness when adding first keyframe to an element.
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 4 | ||||
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index b771f6f3..13902ddb 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -158,7 +158,7 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
158 | return; | 158 | return; |
159 | } | 159 | } |
160 | this.isSelected=true; | 160 | this.isSelected=true; |
161 | this.element.style.left = (this.position - 6) + "px"; | 161 | //this.element.style.left = (this.position - 6) + "px"; Moved to draw cycle. |
162 | this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty; | 162 | this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty; |
163 | this.parentComponent.selectTween(); | 163 | this.parentComponent.selectTween(); |
164 | } | 164 | } |
@@ -167,7 +167,7 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
167 | deselectKeyframe:{ | 167 | deselectKeyframe:{ |
168 | value:function () { | 168 | value:function () { |
169 | this.isSelected = false; | 169 | this.isSelected = false; |
170 | this.element.style.left = (this.position - 5) + "px"; | 170 | // this.element.style.left = (this.position - 5) + "px"; Moved to draw cycle |
171 | } | 171 | } |
172 | } | 172 | } |
173 | // ==== End Controllers | 173 | // ==== End Controllers |
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 85fdfdc9..d41ad74f 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -229,7 +229,13 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
229 | prepareForDraw:{ | 229 | prepareForDraw:{ |
230 | value:function(){ | 230 | value:function(){ |
231 | if(this.initSelect){ | 231 | if(this.initSelect){ |
232 | this.keyframe.selectKeyframe(); | 232 | // Select our new keyframe only if our parent is a main track. |
233 | // TODO: When we decouple all property tracks, this will go away. | ||
234 | if (typeof(this.parentComponent.parentComponent.trackType) === "undefined") { | ||
235 | if (this.tweenID > 0) { | ||
236 | this.keyframe.selectKeyframe(); | ||
237 | } | ||
238 | } | ||
233 | this.initSelect = false; | 239 | this.initSelect = false; |
234 | } | 240 | } |
235 | } | 241 | } |