diff options
author | Jonathan Duran | 2012-04-24 08:46:22 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-04-24 08:46:22 -0700 |
commit | 47488a6ff1b7fc32e2485b3dd82afe207b936b35 (patch) | |
tree | ff84f8f08d7c38c1b729ba89e0670d78249d79ef /js/panels/Timeline/Tween.reel | |
parent | 12fadd1494a9b5fcdaa17fde2f4847277237cf79 (diff) | |
download | ninja-47488a6ff1b7fc32e2485b3dd82afe207b936b35.tar.gz |
Turn on width and height as tweenable properties
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.js | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 7dcd397c..b13a037f 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -186,11 +186,36 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
186 | setAbsoluteTweenProperties:{ | 186 | setAbsoluteTweenProperties:{ |
187 | value:function (eventDetail) { | 187 | value:function (eventDetail) { |
188 | //console.log(eventDetail); | 188 | //console.log(eventDetail); |
189 | if (this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"] && this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]) { | 189 | |
190 | // top | ||
191 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ | ||
190 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; | 192 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; |
193 | } | ||
194 | |||
195 | // left | ||
196 | if(this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]){ | ||
191 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; | 197 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; |
192 | this.parentComponent.parentComponent.updateKeyframeRule(); | ||
193 | } | 198 | } |
199 | |||
200 | // width | ||
201 | if (this.parentComponent.parentComponent.animatedElement.offsetWidth != this.tweenedProperties["width"]){ | ||
202 | this.tweenedProperties["width"] = this.parentComponent.parentComponent.animatedElement.offsetWidth; | ||
203 | } | ||
204 | |||
205 | // height | ||
206 | if (this.parentComponent.parentComponent.animatedElement.offsetHeight != this.tweenedProperties["height"]){ | ||
207 | this.tweenedProperties["height"] = this.parentComponent.parentComponent.animatedElement.offsetHeight; | ||
208 | } | ||
209 | |||
210 | // skewX | ||
211 | |||
212 | // skewY | ||
213 | |||
214 | // rotation | ||
215 | |||
216 | // tell track to update css rule | ||
217 | this.parentComponent.parentComponent.updateKeyframeRule(); | ||
218 | |||
194 | // highlight the tween's span | 219 | // highlight the tween's span |
195 | this.tweenspan.highlightSpan(); | 220 | this.tweenspan.highlightSpan(); |
196 | this.isTweenAnimated = true; | 221 | this.isTweenAnimated = true; |