diff options
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | 2 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 227 |
2 files changed, 168 insertions, 61 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 7e9b8a21..2d508b3c 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | |||
@@ -200,7 +200,7 @@ | |||
200 | "properties" : { | 200 | "properties" : { |
201 | "element" : {"#" : "content-styles"}, | 201 | "element" : {"#" : "content-styles"}, |
202 | "myContent" : {"#":"content-styles"}, | 202 | "myContent" : {"#":"content-styles"}, |
203 | "contentHeight" : 40, | 203 | "contentHeight" : 0, |
204 | "isLabelClickable" : false, | 204 | "isLabelClickable" : false, |
205 | "clicker" : {"#" : "label-styles"}, | 205 | "clicker" : {"#" : "label-styles"}, |
206 | "isCollapsed" : true, | 206 | "isCollapsed" : true, |
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index c6b67c9c..25452891 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -26,8 +26,32 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
26 | return this._trackID; | 26 | return this._trackID; |
27 | }, | 27 | }, |
28 | set:function (value) { | 28 | set:function (value) { |
29 | this._trackID = value; | 29 | if (value !== this._trackID) { |
30 | //this.needsDraw = true; | 30 | this._trackID = value; |
31 | this.trackData.layerID = value; | ||
32 | } | ||
33 | } | ||
34 | }, | ||
35 | _isVisible:{ | ||
36 | value: true | ||
37 | }, | ||
38 | |||
39 | isVisible:{ | ||
40 | get:function(){ | ||
41 | return this._isVisible; | ||
42 | }, | ||
43 | set:function(value){ | ||
44 | if (this._isVisible !== value) { | ||
45 | this._isVisible = value; | ||
46 | if (this.element !== null) { | ||
47 | if (value === true) { | ||
48 | this.element.classList.remove("layer-hidden"); | ||
49 | } else { | ||
50 | this.element.classList.add("layer-hidden"); | ||
51 | } | ||
52 | } | ||
53 | } | ||
54 | this.trackData.isVisible = value; | ||
31 | } | 55 | } |
32 | }, | 56 | }, |
33 | 57 | ||
@@ -40,11 +64,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
40 | return this._isMainCollapsed; | 64 | return this._isMainCollapsed; |
41 | }, | 65 | }, |
42 | set:function (newVal) { | 66 | set:function (newVal) { |
43 | this.log('TimelineTrack.js: isMainCollapsed: ', newVal); | 67 | this._isMainCollapsed = newVal; |
44 | if (newVal !== this._isMainCollapsed) { | 68 | this.trackData.isMainCollapsed = newVal; |
45 | this._isMainCollapsed = newVal; | ||
46 | } | ||
47 | |||
48 | } | 69 | } |
49 | }, | 70 | }, |
50 | _isTransformCollapsed:{ | 71 | _isTransformCollapsed:{ |
@@ -55,9 +76,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
55 | return this._isTransformCollapsed; | 76 | return this._isTransformCollapsed; |
56 | }, | 77 | }, |
57 | set:function (newVal) { | 78 | set:function (newVal) { |
58 | if (newVal !== this._isTransformCollapsed) { | 79 | this._isTransformCollapsed = newVal; |
59 | this._isTransformCollapsed = newVal; | 80 | this.trackData.isTransformCollapsed = newVal; |
60 | } | ||
61 | } | 81 | } |
62 | }, | 82 | }, |
63 | _isPositionCollapsed:{ | 83 | _isPositionCollapsed:{ |
@@ -68,9 +88,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
68 | return this._isPositionCollapsed; | 88 | return this._isPositionCollapsed; |
69 | }, | 89 | }, |
70 | set:function (newVal) { | 90 | set:function (newVal) { |
71 | if (newVal !== this._isPositionCollapsed) { | 91 | this._isPositionCollapsed = newVal; |
72 | this._isPositionCollapsed = newVal; | 92 | this.trackData.isPositionCollapsed = newVal; |
73 | } | ||
74 | } | 93 | } |
75 | }, | 94 | }, |
76 | _isStyleCollapsed:{ | 95 | _isStyleCollapsed:{ |
@@ -81,9 +100,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
81 | return this._isStyleCollapsed; | 100 | return this._isStyleCollapsed; |
82 | }, | 101 | }, |
83 | set:function (newVal) { | 102 | set:function (newVal) { |
84 | if (newVal !== this._isStyleCollapsed) { | 103 | this._isStyleCollapsed = newVal; |
85 | this._isStyleCollapsed = newVal; | 104 | this.trackData.isStyleCollapsed = newVal; |
86 | } | ||
87 | } | 105 | } |
88 | }, | 106 | }, |
89 | _bypassAnimation : { | 107 | _bypassAnimation : { |
@@ -96,8 +114,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
96 | return this._bypassAnimation; | 114 | return this._bypassAnimation; |
97 | }, | 115 | }, |
98 | set: function(newVal) { | 116 | set: function(newVal) { |
99 | //console.log("timelinetrack bypassAnimation setter " + newVal) | 117 | if (typeof(this.trackData) !== "undefined") { |
100 | this._bypassAnimation = newVal; | 118 | this._bypassAnimation = newVal; |
119 | this.trackData.bypassAnimation = newVal; | ||
120 | } | ||
101 | } | 121 | } |
102 | }, | 122 | }, |
103 | 123 | ||
@@ -114,7 +134,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
114 | }, | 134 | }, |
115 | set: function(newVal) { | 135 | set: function(newVal) { |
116 | this._arrStyleTracks = newVal; | 136 | this._arrStyleTracks = newVal; |
117 | //this.needsDraw = true; | 137 | this.trackData.arrStyleTracks = newVal; |
118 | } | 138 | } |
119 | }, | 139 | }, |
120 | _styleTracksRepetition: { | 140 | _styleTracksRepetition: { |
@@ -128,7 +148,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
128 | }, | 148 | }, |
129 | set: function(newVal) { | 149 | set: function(newVal) { |
130 | this._styleTracksRepetition = newVal; | 150 | this._styleTracksRepetition = newVal; |
131 | //needsDraw = true; | ||
132 | } | 151 | } |
133 | }, | 152 | }, |
134 | 153 | ||
@@ -146,7 +165,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
146 | }, | 165 | }, |
147 | set: function(newVal) { | 166 | set: function(newVal) { |
148 | this._arrPositionTracks = newVal; | 167 | this._arrPositionTracks = newVal; |
149 | //this.needsDraw = true; | 168 | this.trackData.arrPositionTracks = newVal; |
150 | } | 169 | } |
151 | }, | 170 | }, |
152 | _positionTracksRepetition: { | 171 | _positionTracksRepetition: { |
@@ -160,7 +179,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
160 | }, | 179 | }, |
161 | set: function(newVal) { | 180 | set: function(newVal) { |
162 | this._positionTracksRepetition = newVal; | 181 | this._positionTracksRepetition = newVal; |
163 | //this.needsDraw = true; | ||
164 | } | 182 | } |
165 | }, | 183 | }, |
166 | 184 | ||
@@ -179,7 +197,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
179 | }, | 197 | }, |
180 | set: function(newVal) { | 198 | set: function(newVal) { |
181 | this._arrTransformTracks = newVal; | 199 | this._arrTransformTracks = newVal; |
182 | //this.needsDraw = true; | 200 | this.trackData.arrTransformTracks = newVal; |
183 | } | 201 | } |
184 | }, | 202 | }, |
185 | _transformTracksRepetition: { | 203 | _transformTracksRepetition: { |
@@ -193,7 +211,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
193 | }, | 211 | }, |
194 | set: function(newVal) { | 212 | set: function(newVal) { |
195 | this._transformTracksRepetition = newVal; | 213 | this._transformTracksRepetition = newVal; |
196 | //this.needsDraw = true; | ||
197 | } | 214 | } |
198 | }, | 215 | }, |
199 | 216 | ||
@@ -209,7 +226,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
209 | }, | 226 | }, |
210 | set:function (newVal) { | 227 | set:function (newVal) { |
211 | this._tweens = newVal; | 228 | this._tweens = newVal; |
212 | //this.needsDraw=true; | 229 | this.trackData.tweens = newVal; |
213 | } | 230 | } |
214 | }, | 231 | }, |
215 | 232 | ||
@@ -243,6 +260,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
243 | if(this._trackDuration > this.application.ninja.timeline.masterDuration){ | 260 | if(this._trackDuration > this.application.ninja.timeline.masterDuration){ |
244 | this.application.ninja.timeline.masterDuration = this._trackDuration; | 261 | this.application.ninja.timeline.masterDuration = this._trackDuration; |
245 | } | 262 | } |
263 | this.trackData.trackDuration = val; | ||
246 | } |