diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 19 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 124 |
2 files changed, 63 insertions, 80 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index 92adee05..77481ac0 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | |||
@@ -101,6 +101,11 @@ | |||
101 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", | 101 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", |
102 | "oneway" : false | 102 | "oneway" : false |
103 | }, | 103 | }, |
104 | "animateCollapser" : { | ||
105 | "boundObject" : {"@" : "repetition1"}, | ||
106 | "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser", | ||
107 | "oneway" : false | ||
108 | }, | ||
104 | "isSelected" : { | 109 | "isSelected" : { |
105 | "boundObject" : {"@" : "repetition1"}, | 110 | "boundObject" : {"@" : "repetition1"}, |
106 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isSelected", | 111 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isSelected", |
@@ -116,6 +121,11 @@ | |||
116 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", | 121 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", |
117 | "oneway" : false | 122 | "oneway" : false |
118 | }, | 123 | }, |
124 | "animateCollapser" : { | ||
125 | "boundObject" : {"@" : "repetition1"}, | ||
126 | "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser", | ||
127 | "oneway" : false | ||
128 | }, | ||
119 | "dtextPositionX" : { | 129 | "dtextPositionX" : { |
120 | "boundObject" : {"@" : "repetition1"}, | 130 | "boundObject" : {"@" : "repetition1"}, |
121 | "boundObjectPropertyPath" : "objectAtCurrentIteration.dtextPositionX", | 131 | "boundObjectPropertyPath" : "objectAtCurrentIteration.dtextPositionX", |
@@ -164,7 +174,7 @@ | |||
164 | "bindings": { | 174 | "bindings": { |
165 | "objects": { | 175 | "objects": { |
166 | "boundObject": {"@": "owner"}, | 176 | "boundObject": {"@": "owner"}, |
167 | "boundObjectPropertyPath": "arrTracks", | 177 | "boundObjectPropertyPath": "arrLayers", |
168 | "oneway": false | 178 | "oneway": false |
169 | } | 179 | } |
170 | } | 180 | } |
@@ -178,7 +188,7 @@ | |||
178 | "bindings" : { | 188 | "bindings" : { |
179 | "trackID" : { | 189 | "trackID" : { |
180 | "boundObject" : {"@" : "repetition2"}, | 190 | "boundObject" : {"@" : "repetition2"}, |
181 | "boundObjectPropertyPath" : "objectAtCurrentIteration.trackID", | 191 | "boundObjectPropertyPath" : "objectAtCurrentIteration.layerID", |
182 | "oneway" : false | 192 | "oneway" : false |
183 | }, | 193 | }, |
184 | "tweens" : { | 194 | "tweens" : { |
@@ -231,6 +241,11 @@ | |||
231 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", | 241 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isTransformCollapsed", |
232 | "oneway" : false | 242 | "oneway" : false |
233 | }, | 243 | }, |
244 | "animateCollapser" : { | ||
245 | "boundObject" : {"@" : "repetition2"}, | ||
246 | "boundObjectPropertyPath" : "objectAtCurrentIteration.animateCollapser", | ||
247 | "oneway" : false | ||
248 | }, | ||
234 | "isStyleCollapsed" : { | 249 | "isStyleCollapsed" : { |
235 | "boundObject" : {"@" : "repetition2"}, | 250 | "boundObject" : {"@" : "repetition2"}, |
236 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", | 251 | "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 59306705..91277a63 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -44,14 +44,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
44 | this._layerRepetition = newVal; | 44 | this._layerRepetition = newVal; |
45 | } | 45 | } |
46 | }, | 46 | }, |
47 | |||
47 | _cacheArrays : { | 48 | _cacheArrays : { |
48 | value: function() { | 49 | value: function() { |
49 | // Cache this.arrLayers and this.arrTracks. | ||
50 | this.log('cacheArrays ' + this._boolCacheArrays) | ||
51 | if (this._boolCacheArrays) { | 50 | if (this._boolCacheArrays) { |
52 | this.log('caching arrays for ', this.application.ninja.currentDocument.name); | ||
53 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; | 51 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; |
54 | this.application.ninja.currentDocument.tlArrTracks = this.arrTracks; | ||
55 | } | 52 | } |
56 | } | 53 | } |
57 | }, | 54 | }, |
@@ -80,10 +77,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
80 | value: null | 77 | value: null |
81 | }, | 78 | }, |
82 | 79 | ||
83 | currentTrackSelected:{ | ||
84 | value: null | ||
85 | }, | ||
86 | |||
87 | millisecondsOffset:{ | 80 | millisecondsOffset:{ |
88 | value:1000 | 81 | value:1000 |
89 | }, | 82 | }, |
@@ -181,22 +174,21 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
181 | value:false, | 174 | value:false, |
182 | writable:true | 175 | writable:true |
183 | }, | 176 | }, |
177 | |||
184 | timeMarkerHolder:{ | 178 | timeMarkerHolder:{ |
185 | value: null | 179 | value: null |
186 | }, | 180 | }, |
187 | /* === END: Models === */ | 181 | /* === END: Models === */ |
188 | |||
189 | /* === BEGIN: Draw cycle === */ | 182 | /* === BEGIN: Draw cycle === */ |
190 | prepareForDraw:{ | 183 | prepareForDraw:{ |
191 | value:function () { | 184 | value:function () { |
192 | this.initTimeline(); | 185 | this.initTimeline(); |
193 | this.eventManager.addEventListener("onOpenDocument", this, false); | 186 | this.eventManager.addEventListener("onOpenDocument", this, false); |
194 | this.eventManager.addEventListener("closeDocument", this, false); | 187 | this.eventManager.addEventListener("closeDocument", this, false); |
195 | this.eventManager.addEventListener("switchDocument", this, false); | 188 | this.eventManager.addEventListener("switchDocument", this, false); |
196 | } | 189 | } |
197 | }, | 190 | }, |
198 | 191 | ||
199 | |||
200 | willDraw:{ | 192 | willDraw:{ |
201 | value:function () { | 193 | value:function () { |
202 | if (this._isLayer) { | 194 | if (this._isLayer) { |
@@ -206,9 +198,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
206 | } | 198 | } |
207 | }, | 199 | }, |
208 | /* === END: Draw cycle === */ | 200 | /* === END: Draw cycle === */ |
209 | |||
210 | /* === BEGIN: Controllers === */ | 201 | /* === BEGIN: Controllers === */ |
211 | |||
212 | // Bind all document-specific events (pass in true to unbind) | 202 | // Bind all document-specific events (pass in true to unbind) |
213 | _bindDocumentEvents : { | 203 | _bindDocumentEvents : { |
214 | value: function(boolUnbind) { | 204 | value: function(boolUnbind) { |
@@ -259,7 +249,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
259 | this.drawTimeMarkers(); | 249 | this.drawTimeMarkers(); |
260 | this._hashKey = "123"; | 250 | this._hashKey = "123"; |
261 | 251 | ||
262 | |||
263 | // Document switching | 252 | // Document switching |
264 | // Check to see if we have saved timeline information in the currentDocument. | 253 | // Check to see if we have saved timeline information in the currentDocument. |
265 | if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") { | 254 | if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") { |
@@ -300,7 +289,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
300 | 289 | ||
301 | } else { | 290 | } else { |
302 | // we do have information stored. Use it. | 291 | // we do have information stored. Use it. |
303 | this.log('oldfile ' + this.application.ninja.currentDocument.name) | ||
304 | this._boolCacheArrays = false; | 292 | this._boolCacheArrays = false; |
305 | this.arrLayers = []; | 293 | this.arrLayers = []; |
306 | this.arrTracks = []; | 294 | this.arrTracks = []; |
@@ -313,8 +301,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
313 | this.layerRepetition.needsDraw = true; | 301 | this.layerRepetition.needsDraw = true; |
314 | this.trackRepetition.needsDraw = true; | 302 | this.trackRepetition.needsDraw = true; |
315 | this.needsDraw = true; | 303 | this.needsDraw = true; |
316 | |||
317 | |||
318 | } | 304 | } |
319 | }, | 305 | }, |
320 | 306 | ||
@@ -323,7 +309,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
323 | // Remove events | 309 | // Remove events |
324 | this._bindDocumentEvents(true); | 310 | this._bindDocumentEvents(true); |
325 | 311 | ||
326 | // Remove every event listener for every tween in TimelineTrack | 312 | // Remove every event listener for every selected tween in the timeline |
327 | this.deselectTweens(); | 313 | this.deselectTweens(); |
328 | 314 | ||
329 | // Reset visual appearance | 315 | // Reset visual appearance |
@@ -342,21 +328,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
342 | 328 | ||
343 | this.currentLayerNumber = 0; |