aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 3a8d1ff3..98989022 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -1039,16 +1039,19 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
1039 value:function (tweenEvent) { 1039 value:function (tweenEvent) {
1040 this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px"; 1040 this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px";
1041 this.tweens[0].tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px"; 1041 this.tweens[0].tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px";
1042 this.tweens[0].tweenData.tweenedProperties["width"] = this.animatedElement.offsetWidth + "px";
1043 this.tweens[0].tweenData.tweenedProperties["height"] = this.animatedElement.offsetHeight + "px";
1042 var animationDuration = Math.round(this.trackDuration / 1000) + "s"; 1044 var animationDuration = Math.round(this.trackDuration / 1000) + "s";
1043 this.animationName = this.animatedElement.classList[0] + "_PositionSize"; 1045 this.animationName = this.animatedElement.classList[0] + "_PositionSize";
1044 this.animationNamesString = this.animationName; 1046 this.animationNamesString = this.animationName;
1045 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); 1047 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName);
1046 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); 1048 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration);
1049 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-fill-mode", "forwards");
1047 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", 1); 1050 this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", 1);
1051
1048 var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} 100% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} }"; 1052 var initRule = "@-webkit-keyframes " + this.animationName + " { 0% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} 100% {top: " + this.animatedElement.offsetTop + "px; left: " + this.animatedElement.offsetLeft + "px;} }";
1049 1053
1050 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule); 1054 this.currentKeyframeRule = this.ninjaStylesContoller.addRule(initRule);
1051
1052 this.insertTween(tweenEvent.offsetX); 1055 this.insertTween(tweenEvent.offsetX);
1053 this.isTrackAnimated = true; 1056 this.isTrackAnimated = true;
1054 } 1057 }
@@ -1062,7 +1065,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
1062 // build the new keyframe string 1065 // build the new keyframe string
1063 var keyframeString = "@-webkit-keyframes " + this.animationName + " {"; 1066 var keyframeString = "@-webkit-keyframes " + this.animationName + " {";
1064 1067
1065 console.log(this.animationName); 1068 //console.log(this.animationName);
1066 1069
1067 for (var i = 0; i < this.tweens.length; i++) { 1070 for (var i = 0; i < this.tweens.length; i++) {
1068 var keyMill = parseInt(this.tweens[i].tweenData.keyFrameMillisec); 1071 var keyMill = parseInt(this.tweens[i].tweenData.keyFrameMillisec);