aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Tween.reel/Tween.js
diff options
context:
space:
mode:
authorKruti Shah2012-05-31 10:44:45 -0700
committerKruti Shah2012-05-31 10:44:45 -0700
commitc350cc1c060fdf17357ddadce024267943784593 (patch)
tree453f86e88f1ee1dfda6fb4b7cc7b17e306e39536 /js/panels/Timeline/Tween.reel/Tween.js
parentfdc4f5c7f81ae3b9adeca2232e60268b4be594a2 (diff)
parent121d0e616f48aa7cd048763554089c20a1883d7a (diff)
downloadninja-c350cc1c060fdf17357ddadce024267943784593.tar.gz
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts: js/panels/Timeline/Layer.reel/Layer.js Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/panels/Timeline/Tween.reel/Tween.js')
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js
index de6a8d56..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();
@@ -243,7 +243,11 @@ var Tween = exports.Tween = Montage.create(Component, {
243 value:function(easeType){ 243 value:function(easeType){
244 // easeTypes - ease, ease-out, ease-in, ease-in-out, linear, cubic-bezier(x1, y1, x2, y2) 244 // easeTypes - ease, ease-out, ease-in, ease-in-out, linear, cubic-bezier(x1, y1, x2, y2)
245 this.tweenedProperties["-webkit-animation-timing-function"] = easeType; 245 this.tweenedProperties["-webkit-animation-timing-function"] = easeType;
246 this.parentComponent.parentComponent.updatePropKeyframeRule(); 246 if(this.parentComponent.parentComponent.isSubproperty){
247 this.parentComponent.parentComponent.updatePropKeyframeRule();
248 } else {
249 this.parentComponent.parentComponent.updateKeyframeRule();
250 }
247 } 251 }
248 }, 252 },
249 253
@@ -274,10 +278,10 @@ var Tween = exports.Tween = Montage.create(Component, {
274 console.log(currentValue); 278 console.log(currentValue);
275 } else { 279 } else {
276 // move animated element to correct position on stage 280 // move animated element to correct position on stage
277 var currentTop = this.tweenedProperties["top"] + "px"; 281 var currentTop = this.tweenedProperties["top"];
278 var currentLeft = this.tweenedProperties["left"] + "px"; 282 var currentLeft = this.tweenedProperties["left"];
279 var currentWidth = this.tweenedProperties["width"] + "px"; 283 var currentWidth = this.tweenedProperties["width"];
280 var currentHeight = this.tweenedProperties["height"] + "px"; 284 var currentHeight = this.tweenedProperties["height"];
281 285
282 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");
283 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");