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 c21b5f91..c733b8d7 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -239,6 +239,8 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
239 | 239 | ||
240 | selectTween:{ | 240 | selectTween:{ |
241 | value: function(){ | 241 | value: function(){ |
242 | console.log("tween select"); | ||
243 | |||
242 | // turn on event listener for element change | 244 | // turn on event listener for element change |
243 | this.eventManager.addEventListener("elementChange", this, false); | 245 | this.eventManager.addEventListener("elementChange", this, false); |
244 | 246 | ||
@@ -257,13 +259,17 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
257 | var currentMillisec = currentMillisecPerPixel * this.keyFramePosition; | 259 | var currentMillisec = currentMillisecPerPixel * this.keyFramePosition; |
258 | this.application.ninja.timeline.updateTimeText(currentMillisec); | 260 | this.application.ninja.timeline.updateTimeText(currentMillisec); |
259 | 261 | ||
260 | // move animated element to correct position on stage | 262 | if(this.parentComponent.parentComponent.isSubproperty){ |
261 | var currentTop = this.tweenedProperties["top"] + "px"; | 263 | console.log("sub prop tween selection"); |
262 | var currentLeft = this.tweenedProperties["left"] + "px"; | 264 | // set property specific style on element |
263 | 265 | } else { | |
264 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); | 266 | // move animated element to correct position on stage |
265 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); | 267 | var currentTop = this.tweenedProperties["top"] + "px"; |
268 | var currentLeft = this.tweenedProperties["left"] + "px"; | ||
266 | 269 | ||
270 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); | ||
271 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); | ||
272 | } | ||
267 | } | 273 | } |
268 | }, | 274 | }, |
269 | 275 | ||