diff options
Diffstat (limited to 'js/panels/Timeline/Tween.reel/Tween.js')
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 414c0535..e5288ad9 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -195,16 +195,16 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
195 | setTweenProperties:{ | 195 | setTweenProperties:{ |
196 | value:function (eventDetail) { | 196 | value:function (eventDetail) { |
197 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ | 197 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ |
198 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; | 198 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop + "px"; |
199 | } | 199 | } |
200 | if(this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]){ | 200 | if(this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]){ |
201 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; | 201 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft + "px"; |
202 | } | 202 | } |
203 | if (this.parentComponent.parentComponent.animatedElement.offsetWidth != this.tweenedProperties["width"]){ | 203 | if (this.parentComponent.parentComponent.animatedElement.offsetWidth != this.tweenedProperties["width"]){ |
204 | this.tweenedProperties["width"] = this.parentComponent.parentComponent.animatedElement.offsetWidth; | 204 | this.tweenedProperties["width"] = this.parentComponent.parentComponent.animatedElement.offsetWidth + "px"; |
205 | } | 205 | } |
206 | if (this.parentComponent.parentComponent.animatedElement.offsetHeight != this.tweenedProperties["height"]){ | 206 | if (this.parentComponent.parentComponent.animatedElement.offsetHeight != this.tweenedProperties["height"]){ |
207 | this.tweenedProperties["height"] = this.parentComponent.parentComponent.animatedElement.offsetHeight; | 207 | this.tweenedProperties["height"] = this.parentComponent.parentComponent.animatedElement.offsetHeight + "px"; |
208 | } | 208 | } |
209 | // tell track to update css rule | 209 | // tell track to update css rule |
210 | this.parentComponent.parentComponent.updateKeyframeRule(); | 210 | this.parentComponent.parentComponent.updateKeyframeRule(); |
@@ -278,10 +278,10 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
278 | console.log(currentValue); | 278 | console.log(currentValue); |
279 | } else { | 279 | } else { |
280 | // move animated element to correct position on stage | 280 | // move animated element to correct position on stage |
281 | var currentTop = this.tweenedProperties["top"] + "px"; | 281 | var currentTop = this.tweenedProperties["top"]; |
282 | var currentLeft = this.tweenedProperties["left"] + "px"; | 282 | var currentLeft = this.tweenedProperties["left"]; |
283 | var currentWidth = this.tweenedProperties["width"] + "px"; | 283 | var currentWidth = this.tweenedProperties["width"]; |
284 | var currentHeight = this.tweenedProperties["height"] + "px"; | 284 | var currentHeight = this.tweenedProperties["height"]; |
285 | 285 | ||
286 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); | 286 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "top", [currentTop], "Change", "tween"); |
287 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); | 287 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); |