From 0b41d5c873b25461e2217782af1c410b89cb56de Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Fri, 15 Jun 2012 14:03:03 -0700 Subject: Timeline: Bug fix IKNINJA 1716, "Ease options are not correctly displayed in Timeline after a file is saved and re-opened." --- js/panels/Timeline/Span.reel/Span.js | 1 - js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 1 + js/panels/Timeline/Tween.reel/Tween.js | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'js/panels/Timeline') diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js index 7347ef51..5b0f3f94 100644 --- a/js/panels/Timeline/Span.reel/Span.js +++ b/js/panels/Timeline/Span.reel/Span.js @@ -83,7 +83,6 @@ var Span = exports.Span = Montage.create(Component, { draw:{ value: function(){ - this.element.style.width = this.spanWidth + "px"; if ((this.spanWidth <= 70) && (this.spanWidth >0)) { diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index fc88b779..695f13ac 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -879,6 +879,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { newTween.tweenData.keyFrameMillisec = currentMilliSec; newTween.tweenData.tweenID = this.nextKeyframe; newTween.tweenData.spanPosition =clickPosition - newTween.tweenData.spanWidth; + newTween.tweenData.easing = this.currentKeyframeRule[i].style.webkitAnimationName; this.tweens.push(newTween); } this.nextKeyframe += 1; diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 49cfa9c9..d96cc932 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -154,12 +154,27 @@ var Tween = exports.Tween = Montage.create(Component, { } }, + + _easing: { + value: false + }, + easing: { + serializable: true, + get:function () { + return this._easing; + }, + set:function (newVal) { + this._easing = newVal; + } + + }, draw:{ value:function () { this.element.style.left = this.spanPosition + "px"; this.keyframe.position = this.spanWidth; this.tweenspan.spanWidth = this.spanWidth; + this.tweenspan.easing = this.easing; if(this.isTweenAnimated){ this.tweenspan.highlightSpan(); } @@ -175,6 +190,7 @@ var Tween = exports.Tween = Montage.create(Component, { this.tweenID = this.tweenData.tweenID; this.tweenedProperties = this.tweenData.tweenedProperties; this.isTweenAnimated = this.tweenData.isTweenAnimated; + this.easing = this.tweenData.easing; this.needsDraw = true; } }, -- cgit v1.2.3