aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Tween.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Tween.reel')
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js29
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;