diff options
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 | ||