aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Tween.reel
diff options
context:
space:
mode:
authorJonathan Duran2012-05-24 10:49:09 -0700
committerJonathan Duran2012-05-24 10:49:09 -0700
commit003d08198368d93078049ee879aaac4275ac4817 (patch)
treee7c2076b9af60f523643e0d2ae1e91f8c673cebb /js/panels/Timeline/Tween.reel
parent9809c96d96c24a512f6da1efbf44f174ca9321fe (diff)
downloadninja-003d08198368d93078049ee879aaac4275ac4817.tar.gz
collapse fix for restored style layers
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/Tween.reel')
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js16
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");