diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 1986 |
1 files changed, 993 insertions, 993 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 3dc2e514..da6f8595 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -29,9 +29,9 @@ POSSIBILITY OF SUCH DAMAGE. | |||
29 | </copyright> */ | 29 | </copyright> */ |
30 | 30 | ||
31 | var Montage = require("montage/core/core").Montage, | 31 | var Montage = require("montage/core/core").Montage, |
32 | Component = require("montage/ui/component").Component, | 32 | Component = require("montage/ui/component").Component, |
33 | nj = require("js/lib/NJUtils").NJUtils, | 33 | nj = require("js/lib/NJUtils").NJUtils, |
34 | EasingMenuPopup = require("js/panels/Timeline/EasingMenu.reel").EasingMenu; | 34 | EasingMenuPopup = require("js/panels/Timeline/EasingMenu.reel").EasingMenu; |
35 | 35 | ||
36 | var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | 36 | var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { |
37 | 37 | ||
@@ -144,20 +144,20 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
144 | this._currentDocument = value; | 144 | this._currentDocument = value; |
145 | 145 | ||
146 | var boolDoc = false, | 146 | var boolDoc = false, |
147 | boolView = false; | 147 | boolView = false; |
148 | 148 | ||
149 | // Should we enable the panel? | 149 | // Should we enable the panel? |
150 | // Only if we have both a document and we're in design view. | 150 | // Only if we have both a document and we're in design view. |
151 | if (typeof(value) !== "undefined") { | 151 | if (typeof(value) !== "undefined") { |
152 | if (value.currentView === "design") { | 152 | if (value.currentView === "design") { |
153 | // We are in design view. | 153 | // We are in design view. |
154 | boolView = true; | 154 | boolView = true; |
155 | } | 155 | } |
156 | } | 156 | } |
157 | if (typeof(this._currentDocument) !== "undefined") { | 157 | if (typeof(this._currentDocument) !== "undefined") { |
158 | // We have a document, or at least we have initialized the panel. | 158 | // We have a document, or at least we have initialized the panel. |
159 | boolDoc = true; | 159 | boolDoc = true; |
160 | } | 160 | } |
161 | 161 | ||
162 | if(boolDoc === false) { | 162 | if(boolDoc === false) { |
163 | this._boolCacheArrays = false; | 163 | this._boolCacheArrays = false; |
@@ -165,18 +165,18 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
165 | this._boolCacheArrays = true; | 165 | this._boolCacheArrays = true; |
166 | this.enablePanel(false); | 166 | this.enablePanel(false); |
167 | } else { | 167 | } else { |
168 | if(boolView === true) { | 168 | if(boolView === true) { |
169 | this._boolCacheArrays = false; | 169 | this._boolCacheArrays = false; |
170 | this.clearTimelinePanel(); | 170 | this.clearTimelinePanel(); |
171 | this._boolCacheArrays = true; | 171 | this._boolCacheArrays = true; |
172 | 172 | ||
173 | // Rebind the document events for the new document context | 173 | // Rebind the document events for the new document context |
174 | this._bindDocumentEvents(); | 174 | this._bindDocumentEvents(); |
175 | 175 | ||
176 | // Initialize the timeline for the document. | 176 | // Initialize the timeline for the document. |
177 | this.initTimelineForDocument(); | 177 | this.initTimelineForDocument(); |
178 | this.enablePanel(true); | 178 | this.enablePanel(true); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | } | 181 | } |
182 | }, | 182 | }, |
@@ -264,23 +264,23 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
264 | }, | 264 | }, |
265 | 265 | ||
266 | _areTracksScrolling: { | 266 | _areTracksScrolling: { |
267 | value: false | 267 | value: false |
268 | }, | 268 | }, |
269 | 269 | ||
270 | _areTracksCollapsing: { | 270 | _areTracksCollapsing: { |
271 | value: false | 271 | value: false |
272 | }, | 272 | }, |
273 | 273 | ||
274 | _currentOpenSpanMenu: { | 274 | _currentOpenSpanMenu: { |
275 | value: false | 275 | value: false |
276 | }, | 276 | }, |
277 | currentOpenSpanMenu: { | 277 | currentOpenSpanMenu: { |
278 | get: function() { | 278 | get: function() { |
279 | return this._currentOpenSpanMenu; | 279 | return this._currentOpenSpanMenu; |
280 | }, | 280 | }, |
281 | set: function(newVal) { | 281 | set: function(newVal) { |
282 | this._currentOpenSpanMenu = newVal; | 282 | this._currentOpenSpanMenu = newVal; |
283 | } | 283 | } |
284 | }, | 284 | }, |
285 | 285 | ||
286 | // Set to false to skip array caching array sets in currentDocument | 286 | // Set to false to skip array caching array sets in currentDocument |
@@ -288,7 +288,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
288 | value:true | 288 | value:true |
289 | }, | 289 | }, |
290 | 290 | ||
291 | // Current layer number: iterated and used to assign layer IDs. | 291 | // Current layer number: iterated and used to assign layer IDs. |
292 | _currentLayerNumber:{ | 292 | _currentLayerNumber:{ |
293 | value:0 | 293 | value:0 |
294 | }, | 294 | }, |
@@ -318,16 +318,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
318 | } | 318 | } |
319 | }, | 319 | }, |
320 | _currentElementsSelected: { | 320 | _currentElementsSelected: { |
321 | value: [] | 321 | value: [] |
322 | }, | 322 | }, |
323 | currentElementsSelected: { | 323 | currentElementsSelected: { |
324 | get: function() { | 324 | get: function() { |
325 | return this._currentElementsSelected; | 325 | return this._currentElementsSelected; |
326 | }, | 326 | }, |
327 | set: function(newVal) { | 327 | set: function(newVal) { |
328 | this._currentElementsSelected = newVal; | 328 | this._currentElementsSelected = newVal; |
329 | this.cacheTimeline(); | 329 | this.cacheTimeline(); |
330 | } | 330 | } |
331 | }, | 331 | }, |
332 | 332 | ||
333 | _currentLayersSelected:{ | 333 | _currentLayersSelected:{ |
@@ -344,31 +344,31 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
344 | }, | 344 | }, |
345 | 345 | ||
346 | _easingMenu: { | 346 | _easingMenu: { |
347 | value: null | 347 | value: null |
348 | }, | 348 | }, |
349 | easingMenu: { | 349 | easingMenu: { |
350 | serializable: true, | 350 | serializable: true, |
351 | get: function() { | 351 | get: function() { |
352 | return this._easingMenu; | 352 | return this._easingMenu; |
353 | }, | 353 | }, |
354 | set: function(newVal) { | 354 | set: function(newVal) { |
355 | this._easingMenu = newVal; | 355 | this._easingMenu = newVal; |
356 | } | 356 | } |
357 | }, | 357 | }, |
358 | 358 | ||
359 | // The index of the last layer that was clicked on | 359 | // The index of the last layer that was clicked on |
360 | // (used for shift-click multiselect) | 360 | // (used for shift-click multiselect) |
361 | _lastLayerClicked : { | 361 | _lastLayerClicked : { |
362 | value: 0 | 362 | value: 0 |
363 | }, | 363 | }, |
364 | lastLayerClicked: { | 364 | lastLayerClicked: { |
365 | serializable: true, | 365 | serializable: true, |
366 | get: function() { | 366 | get: function() { |
367 | return this._lastLayerClicked; | 367 | return this._lastLayerClicked; |
368 | }, | 368 | }, |
369 | set: function(newVal) { | 369 | set: function(newVal) { |
370 | this._lastLayerClicked = newVal | 370 | this._lastLayerClicked = newVal |
371 | } | 371 | } |
372 | }, | 372 | }, |
373 | 373 | ||
374 | _millisecondsOffset:{ | 374 | _millisecondsOffset:{ |
@@ -400,7 +400,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
400 | set:function (val) { | 400 | set:function (val) { |
401 | this._masterDuration = val; | 401 | this._masterDuration = val; |
402 | var intDur = Math.round(val/12), | 402 | var intDur = Math.round(val/12), |
403 | strWidth = intDur + "px"; | 403 | strWidth = intDur + "px"; |
404 | this.timebar.style.width = strWidth; | 404 | this.timebar.style.width = strWidth; |
405 | } | 405 | } |
406 | }, | 406 | }, |
@@ -479,137 +479,137 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
479 | 479 | ||
480 |