diff options
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 30280727..d837997a 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -462,7 +462,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
462 | 462 | ||
463 | retrieveStoredTweens:{ | 463 | retrieveStoredTweens:{ |
464 | value:function () { | 464 | value:function () { |
465 | var percentValue, fraction, splitValue, i = 0; | 465 | var percentValue, fraction, splitValue,offsetAttribute,topOffSetAttribute,leftOffsetAttribute, i = 0; |
466 | 466 | ||
467 | this.animatedElement = this.application.ninja.timeline.arrLayers[this.trackID - 1].elementsList[0]; | 467 | this.animatedElement = this.application.ninja.timeline.arrLayers[this.trackID - 1].elementsList[0]; |
468 | this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); | 468 | this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); |
@@ -478,12 +478,22 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
478 | while (this.currentKeyframeRule[i]) { | 478 | while (this.currentKeyframeRule[i]) { |
479 | var newTween = {}; | 479 | var newTween = {}; |
480 | 480 | ||
481 | offsetAttribute = this.currentKeyframeRule[i].cssText.split(" "); | ||
482 | topOffSetAttribute = offsetAttribute[3].split("px"); | ||
483 | leftOffsetAttribute = offsetAttribute[5].split("px"); | ||
484 | |||
485 | parseInt(topOffSetAttribute[0]); | ||
486 | parseInt(leftOffsetAttribute[0]); | ||
487 | |||
481 | if (this.currentKeyframeRule[i].keyText === "0%") { | 488 | if (this.currentKeyframeRule[i].keyText === "0%") { |
482 | newTween.spanWidth = 0; | 489 | newTween.spanWidth = 0; |
483 | newTween.keyFramePosition = 0; | 490 | newTween.keyFramePosition = 0; |
484 | newTween.keyFrameMillisec = 0; | 491 | newTween.keyFrameMillisec = 0; |
485 | newTween.tweenID = 0; | 492 | newTween.tweenID = 0; |
486 | newTween.spanPosition = 0; | 493 | newTween.spanPosition = 0; |
494 | newTween.tweenedProperties = []; | ||
495 | newTween.tweenedProperties["top"] = topOffSetAttribute[0]; | ||
496 | newTween.tweenedProperties["left"] = leftOffsetAttribute[0]; | ||
487 | this.tweens.push(newTween); | 497 | this.tweens.push(newTween); |
488 | 498 | ||
489 | } | 499 | } |
@@ -499,6 +509,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
499 | newTween.keyFrameMillisec = this.currentMilliSec; | 509 | newTween.keyFrameMillisec = this.currentMilliSec; |
500 | newTween.tweenID = this.nextKeyframe; | 510 | newTween.tweenID = this.nextKeyframe; |
501 | newTween.spanPosition = this.clickPos - newTween.spanWidth; | 511 | newTween.spanPosition = this.clickPos - newTween.spanWidth; |
512 | newTween.tweenedProperties=[]; | ||
513 | newTween.tweenedProperties["top"] = topOffSetAttribute[0]; | ||
514 | newTween.tweenedProperties["left"] = leftOffsetAttribute[0]; | ||
502 | this.tweens.push(newTween); | 515 | this.tweens.push(newTween); |
503 | 516 | ||
504 | 517 | ||