diff options
author | Valerio Virgillito | 2012-06-27 14:45:11 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-27 14:45:11 -0700 |
commit | 07e7e2f28b863b0a4d139cc7e649a630b162e0da (patch) | |
tree | 649f371e6c4f54284fe488e3c370e7f1a8ac90fc /js/panels/Timeline/Tween.reel/Tween.js | |
parent | 6b80467233e05a56dcb2d6952bd7044fd826e8d3 (diff) | |
parent | 338d3fdadf3a4b758e855dd48b325ed3099443ea (diff) | |
download | ninja-07e7e2f28b863b0a4d139cc7e649a630b162e0da.tar.gz |
Merge pull request #342 from imix23ways/Timeline-pullrequest
Timeline Bugfixes
Diffstat (limited to 'js/panels/Timeline/Tween.reel/Tween.js')
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index c0949f93..89f18f98 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -203,10 +203,13 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
203 | // temp - testing var | 203 | // temp - testing var |
204 | var useAbsolute = true; | 204 | var useAbsolute = true; |
205 | 205 | ||
206 | if(event.detail.type === "cssChange"){ | ||
207 | event.detail.source="cssPanelChange" | ||
208 | } | ||
209 | |||
206 | if (event.detail.source && event.detail.source !== "tween") { | 210 | if (event.detail.source && event.detail.source !== "tween") { |
207 | 211 | ||
208 | if(this.parentComponent.parentComponent.isSubproperty){ | 212 | if(this.parentComponent.parentComponent.isSubproperty){ |
209 | console.log("setting style tween property") | ||
210 | this.setStyleTweenProperty(event.detail); | 213 | this.setStyleTweenProperty(event.detail); |
211 | } else { | 214 | } else { |
212 | // check for correct element selection | 215 | // check for correct element selection |
@@ -222,7 +225,8 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
222 | 225 | ||
223 | setTweenProperties:{ | 226 | setTweenProperties:{ |
224 | value:function (eventDetail) { | 227 | value:function (eventDetail) { |
225 | if (eventDetail.source === "SelectionTool") { | 228 | |
229 | if (eventDetail.source === "SelectionTool" || eventDetail.source === "timeline" || eventDetail.source === "pi" || eventDetail.source === "cssPanelChange") { | ||
226 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ | 230 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ |
227 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop + "px"; | 231 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop + "px"; |
228 | } | 232 | } |
@@ -316,7 +320,9 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
316 | if(this.parentComponent.parentComponent.isSubproperty){ | 320 | if(this.parentComponent.parentComponent.isSubproperty){ |
317 | // set property specific style on element | 321 | // set property specific style on element |
318 | var currentValue = this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty]; | 322 | var currentValue = this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty]; |
319 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], this.parentComponent.parentComponent.trackEditorProperty, [currentValue], "Change", "tween"); | 323 | var el = this.parentComponent.parentComponent.animatedElement; |
324 | var prop = this.parentComponent.parentComponent.trackEditorProperty; | ||
325 | this.application.ninja.elementMediator.setProperty([el], prop, [currentValue], "Change", "tween"); | ||
320 | } else { | 326 | } else { |
321 | // move animated element to correct position on stage | 327 | // move animated element to correct position on stage |
322 | var currentTop = this.tweenedProperties["top"]; | 328 | var currentTop = this.tweenedProperties["top"]; |