diff options
author | Jonathan Duran | 2012-05-04 11:00:12 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-04 11:00:12 -0700 |
commit | 0e12f00d6afffabd370347335a56d0ddd17c0232 (patch) | |
tree | ec444ae92dbb4dccbfb8ea63c71e7322d1dda107 /js/panels/Timeline/Tween.reel/Tween.js | |
parent | 16f95cb8c70608eeede6c9e0834b184ade6c7752 (diff) | |
download | ninja-0e12f00d6afffabd370347335a56d0ddd17c0232.tar.gz |
Fix subproperty keyframe selection
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/Tween.reel/Tween.js')
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 8b6826ed..45714079 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -225,6 +225,8 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
225 | 225 | ||
226 | selectTween:{ | 226 | selectTween:{ |
227 | value: function(){ | 227 | value: function(){ |
228 | console.log("tween select"); | ||
229 | |||
228 | // turn on event listener for element change | 230 | // turn on event listener for element change |
229 | this.eventManager.addEventListener("elementChange", this, false); | 231 | this.eventManager.addEventListener("elementChange", this, false); |
230 | 232 | ||
@@ -243,13 +245,17 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
243 | var currentMillisec = currentMillisecPerPixel * this.keyFramePosition; | 245 | var currentMillisec = currentMillisecPerPixel * this.keyFramePosition; |
244 | this.application.ninja.timeline.updateTimeText(currentMillisec); | 246 | this.application.ninja.timeline.updateTimeText(currentMillisec); |
245 | 247 | ||
246 | // move animated element to correct position on stage | 248 | if(this.parentComponent.parentComponent.isSubproperty){ |
247 | var currentTop = this.tweenedProperties["top"] + "px"; | 249 | console.log("sub prop tween selection"); |
248 | var currentLeft = this.tweenedProperties["left"] + "px"; | 250 | // set property specific style on element |
249 | 251 | } else { | |
250 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); | 252 | // move animated element to correct position on stage |
251 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); | 253 | var currentTop = this.tweenedProperties["top"] + "px"; |
254 | var currentLeft = this.tweenedProperties["left"] + "px"; | ||
252 | 255 | ||
256 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); | ||
257 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); | ||
258 | } | ||
253 | } | 259 | } |
254 | }, | 260 | }, |
255 | 261 | ||