aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js6
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js20
2 files changed, 25 insertions, 1 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 26ce526f..8953888b 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -797,6 +797,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
797 newTween.tweenData.tweenID = 0; 797 newTween.tweenData.tweenID = 0;
798 newTween.tweenData.spanPosition = 0; 798 newTween.tweenData.spanPosition = 0;
799 newTween.tweenData.easing = "none"; 799 newTween.tweenData.easing = "none";
800 newTween.tweenData.initSelect = true;
800 newTween.tweenData.tweenedProperties = []; 801 newTween.tweenData.tweenedProperties = [];
801 newTween.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px"; 802 newTween.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px";
802 newTween.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px"; 803 newTween.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px";
@@ -813,6 +814,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
813 newTween.tweenData.tweenID = this.nextKeyframe; 814 newTween.tweenData.tweenID = this.nextKeyframe;
814 newTween.tweenData.spanPosition = clickPos - newTween.tweenData.spanWidth; 815 newTween.tweenData.spanPosition = clickPos - newTween.tweenData.spanWidth;
815 newTween.tweenData.easing = "none"; 816 newTween.tweenData.easing = "none";
817 newTween.tweenData.initSelect = true;
816 newTween.tweenData.tweenedProperties = []; 818 newTween.tweenData.tweenedProperties = [];
817 newTween.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px"; 819 newTween.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px";
818 newTween.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px"; 820 newTween.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px";
@@ -920,6 +922,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
920 newTweenToInsert.tweenData.tweenID = this.tweens.length; 922 newTweenToInsert.tweenData.tweenID = this.tweens.length;
921 newTweenToInsert.tweenData.spanPosition = position - newTweenToInsert.tweenData.spanWidth; 923 newTweenToInsert.tweenData.spanPosition = position - newTweenToInsert.tweenData.spanWidth;
922 newTweenToInsert.tweenData.tweenedProperties = []; 924 newTweenToInsert.tweenData.tweenedProperties = [];
925 newTweenToInsert.tweenData.easing = "none";
926 newTweenToInsert.tweenData.initSelect = true;
923 newTweenToInsert.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px"; 927 newTweenToInsert.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px";
924 newTweenToInsert.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px"; 928 newTweenToInsert.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px";
925 newTweenToInsert.tweenData.tweenedProperties["width"] = this.animatedElement.offsetWidth + "px"; 929 newTweenToInsert.tweenData.tweenedProperties["width"] = this.animatedElement.offsetWidth + "px";
@@ -999,6 +1003,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
999 newTween.tweenData.keyFrameMillisec = 0; 1003 newTween.tweenData.keyFrameMillisec = 0;
1000 newTween.tweenData.tweenID = 0; 1004 newTween.tweenData.tweenID = 0;
1001 newTween.tweenData.spanPosition = 0; 1005 newTween.tweenData.spanPosition = 0;
1006 newTween.tweenData.initSelect = false;
1002 this.tweens.push(newTween); 1007 this.tweens.push(newTween);
1003 this.createMatchingPositionSizeTween(newTween); 1008 this.createMatchingPositionSizeTween(newTween);
1004 } 1009 }
@@ -1016,6 +1021,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
1016 newTween.tweenData.keyFramePosition = clickPosition; 1021 newTween.tweenData.keyFramePosition = clickPosition;
1017 newTween.tweenData.keyFrameMillisec = currentMilliSec; 1022 newTween.tweenData.keyFrameMillisec = currentMilliSec;
1018 newTween.tweenData.tweenID = this.nextKeyframe; 1023 newTween.tweenData.tweenID = this.nextKeyframe;
1024 newTween.tweenData.initSelect = false;
1019 newTween.tweenData.spanPosition =clickPosition - newTween.tweenData.spanWidth; 1025 newTween.tweenData.spanPosition =clickPosition - newTween.tweenData.spanWidth;
1020 newTween.tweenData.easing = this.currentKeyframeRule[i].style.webkitAnimationName; 1026 newTween.tweenData.easing = this.currentKeyframeRule[i].style.webkitAnimationName;
1021 if (newTween.tweenData.easing == "") { 1027 if (newTween.tweenData.easing == "") {
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js
index ae8acc57..0d189fba 100644
--- a/js/panels/Timeline/Tween.reel/Tween.js
+++ b/js/panels/Timeline/Tween.reel/Tween.js
@@ -170,9 +170,26 @@ var Tween = exports.Tween = Montage.create(Component, {
170 170
171 }, 171 },
172 172
173 _initSelect:{
174 value: null
175 },
176 initSelect:{
177 serializable:true,
178 get:function () {
179 return this._initSelect;
180 },
181 set:function (newVal) {
182 this._initSelect = newVal;
183 this.tweenData.initSelect = newVal;
184 }
185 },
186
173 prepareForDraw:{ 187 prepareForDraw:{
174 value:function(){ 188 value:function(){
175 this.keyframe.selectKeyframe(); 189 if(this.initSelect){
190 this.keyframe.selectKeyframe();
191 this.initSelect = false;
192 }
176 } 193 }
177 }, 194 },
178 195
@@ -200,6 +217,7 @@ var Tween = exports.Tween = Montage.create(Component, {
200 this.tweenedProperties = this.tweenData.tweenedProperties; 217 this.tweenedProperties = this.tweenData.tweenedProperties;
201 this.isTweenAnimated = this.tweenData.isTweenAnimated; 218 this.isTweenAnimated = this.tweenData.isTweenAnimated;
202 this.easing = this.tweenData.easing; 219 this.easing = this.tweenData.easing;
220 this.initSelect = this.tweenData.initSelect;
203 this.needsDraw = true; 221 this.needsDraw = true;
204 } 222 }
205 }, 223 },