aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Tween.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Tween.reel')
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js50
1 files changed, 31 insertions, 19 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js
index 6ff38bef..2b308d9a 100644
--- a/js/panels/Timeline/Tween.reel/Tween.js
+++ b/js/panels/Timeline/Tween.reel/Tween.js
@@ -14,6 +14,24 @@ var Tween = exports.Tween = Montage.create(Component, {
14 value: true 14 value: true
15 }, 15 },
16 16
17 _tweenData:{
18 serializable: true,
19 value:{}
20 },
21
22 tweenData:{
23 serializable: true,
24 get:function(){
25 return this._tweenData;
26 },
27 set:function(val){
28 this._tweenData = val;
29 if(this._tweenData){
30 this.setData();
31 }
32 }
33 },
34
17 _spanWidth: { 35 _spanWidth: {
18 serializable: true, 36 serializable: true,
19 value: 0 37 value: 0
@@ -26,7 +44,6 @@ var Tween = exports.Tween = Montage.create(Component, {
26 }, 44 },
27 set: function(value){ 45 set: function(value){
28 this._spanWidth = value; 46 this._spanWidth = value;
29 this.needsDraw = true;
30 } 47 }
31 }, 48 },
32 49
@@ -41,7 +58,6 @@ var Tween = exports.Tween = Montage.create(Component, {
41 }, 58 },
42 set:function (value) { 59 set:function (value) {
43 this._spanPosition = value; 60 this._spanPosition = value;
44 this.needsDraw = true;
45 } 61 }
46 }, 62 },
47 63
@@ -56,7 +72,6 @@ var Tween = exports.Tween = Montage.create(Component, {
56 }, 72 },
57 set:function (value) { 73 set:function (value) {
58 this._keyFramePosition = value; 74 this._keyFramePosition = value;
59 this.needsDraw = true;
60 } 75 }
61 }, 76 },
62 77
@@ -115,24 +130,8 @@ var Tween = exports.Tween = Montage.create(Component, {
115 }, 130 },
116 set:function (value) { 131 set:function (value) {
117 this._isTweenAnimated = value; 132 this._isTweenAnimated = value;
118 this.needsDraw = true;
119 } 133 }
120 }, 134 },
121
122 _isClearing : {
123 serializable: true,
124 value: false
125 },
126 isClearing : {
127 get: function() {
128 return this._isClearing;
129 },
130 set: function(newVal) {
131 if (newVal === "clear it") {
132 this.eventManager.removeEventListener("elementChange", this, false);
133 }
134 }
135 },
136 135
137 draw:{ 136 draw:{
138 value:function () { 137 value:function () {
@@ -145,6 +144,19 @@ var Tween = exports.Tween = Montage.create(Component, {
145 } 144 }
146 }, 145 },
147 146
147 setData:{
148 value:function(){
149 this.spanWidth = this.tweenData.spanWidth;
150 this.keyFramePosition = this.tweenData.keyFramePosition;
151 this.spanPosition = this.tweenData.spanPosition;
152 this.keyFrameMillisec = this.tweenData.keyFrameMillisec;
153 this.tweenID = this.tweenData.tweenID;
154 this.tweenedProperties = this.tweenData.tweenedProperties;
155 this.isTweenAnimated = this.tweenData.isTweenAnimated;
156 this.needsDraw = true;
157 }
158 },
159
148 handleElementChange:{ 160 handleElementChange:{
149 value:function (event) { 161 value:function (event) {
150 162