diff options
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r-- | js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | 3 | ||||
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 19 |
2 files changed, 7 insertions, 15 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index 8d2c1918..43370a64 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | |||
@@ -225,6 +225,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
225 | newTween.tweenData.tweenID = 0; | 225 | newTween.tweenData.tweenID = 0; |
226 | newTween.tweenData.spanPosition = 0; | 226 | newTween.tweenData.spanPosition = 0; |
227 | newTween.tweenData.tweenedProperties = []; | 227 | newTween.tweenData.tweenedProperties = []; |
228 | newTween.tweenData.tweenedProperties[this.trackEditorProperty] = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); | ||
228 | 229 | ||
229 | this.propTweens.push(newTween); | 230 | this.propTweens.push(newTween); |
230 | 231 | ||
@@ -290,7 +291,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
290 | 291 | ||
291 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); | 292 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", newAnimationNames); |
292 | 293 | ||
293 | this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); | 294 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", newAnimationDuration); |
294 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); | 295 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", newIterationCount); |
295 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "both"); | 296 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "both"); |
296 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-transition-timing-function", "linear"); | 297 | //this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-transition-timing-function", "linear"); |
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 846c2f1c..63dabefe 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -201,28 +201,18 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
201 | 201 | ||
202 | setAbsoluteTweenProperties:{ | 202 | setAbsoluteTweenProperties:{ |
203 | value:function (eventDetail) { | 203 | value:function (eventDetail) { |
204 | //console.log(eventDetail); | ||
205 | |||
206 | // top | ||
207 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ | 204 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ |
208 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; | 205 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; |
209 | } | 206 | } |
210 | |||
211 | // left | ||
212 | if(this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]){ | 207 | if(this.parentComponent.parentComponent.animatedElement.offsetLeft != this.tweenedProperties["left"]){ |
213 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; | 208 | this.tweenedProperties["left"] = this.parentComponent.parentComponent.animatedElement.offsetLeft; |
214 | } | 209 | } |
215 | |||
216 | // width | ||
217 | if (this.parentComponent.parentComponent.animatedElement.offsetWidth != this.tweenedProperties["width"]){ | 210 | if (this.parentComponent.parentComponent.animatedElement.offsetWidth != this.tweenedProperties["width"]){ |
218 | this.tweenedProperties["width"] = this.parentComponent.parentComponent.animatedElement.offsetWidth; | 211 | this.tweenedProperties["width"] = this.parentComponent.parentComponent.animatedElement.offsetWidth; |
219 | } | 212 | } |
220 | |||
221 | // height | ||
222 | if (this.parentComponent.parentComponent.animatedElement.offsetHeight != this.tweenedProperties["height"]){ | 213 | if (this.parentComponent.parentComponent.animatedElement.offsetHeight != this.tweenedProperties["height"]){ |
223 | this.tweenedProperties["height"] = this.parentComponent.parentComponent.animatedElement.offsetHeight; | 214 | this.tweenedProperties["height"] = this.parentComponent.parentComponent.animatedElement.offsetHeight; |
224 | } | 215 | } |
225 | |||
226 | // tell track to update css rule | 216 | // tell track to update css rule |
227 | this.parentComponent.parentComponent.updateKeyframeRule(); | 217 | this.parentComponent.parentComponent.updateKeyframeRule(); |
228 | 218 | ||
@@ -247,21 +237,22 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
247 | // ignore top, left, width, and height | 237 | // ignore top, left, width, and height |
248 | console.log(eventDetail.data.value[0]); | 238 | console.log(eventDetail.data.value[0]); |
249 | this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; | 239 | this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; |
250 | console.log(this.tweenedProperties); | 240 | this.parentComponent.parentComponent.updatePropKeyframeRule(); |
241 | |||
251 | } else if(eventDetail.type == "setColor"){ | 242 | } else if(eventDetail.type == "setColor"){ |
252 | var prop = this.parentComponent.parentComponent.trackEditorProperty; | 243 | var prop = this.parentComponent.parentComponent.trackEditorProperty; |
253 | this.tweenedProperties[prop] = eventDetail.data.value.color.css; | 244 | this.tweenedProperties[prop] = eventDetail.data.value.color.css; |
254 | this.parentComponent.parentComponent.updatePropKeyframeRule(); | 245 | this.parentComponent.parentComponent.updatePropKeyframeRule(); |
246 | |||
255 | } else if(eventDetail.type == "setProperty"){ | 247 | } else if(eventDetail.type == "setProperty"){ |
256 | // ignore top, left, width, and height | 248 | // ignore top, left, width, and height |
257 | console.log(eventDetail.data.value[0]); | 249 | console.log(eventDetail.data.value[0]); |
258 | this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; | 250 | this.tweenedProperties[this.parentComponent.parentComponent.trackEditorProperty] = eventDetail.data.value[0]; |
259 | console.log(this.tweenedProperties); | 251 | this.parentComponent.parentComponent.updatePropKeyframeRule(); |
252 | |||
260 | }else { | 253 | }else { |
261 | console.log("TWEEN Unhandled type - setStyleTweenProperty : " + eventDetail.type); | 254 | console.log("TWEEN Unhandled type - setStyleTweenProperty : " + eventDetail.type); |
262 | } | 255 | } |
263 | |||
264 | |||
265 | } | 256 | } |
266 | }, | 257 | }, |
267 | 258 | ||