aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js3071
1 files changed, 1536 insertions, 1535 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index a5737334..d7329ac7 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -1,1536 +1,1537 @@
1/* <copyright> 1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/> 2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> 3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6 6
7var Montage = require("montage/core/core").Montage; 7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component; 8var Component = require("montage/ui/component").Component;
9var nj = require("js/lib/NJUtils").NJUtils; 9var nj = require("js/lib/NJUtils").NJUtils;
10 10
11var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { 11var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
12 12
13 hasTemplate:{ 13 hasTemplate:{
14 value:true 14 value:true
15 }, 15 },
16 16
17 /* === BEGIN: Models === */ 17 /* === BEGIN: Models === */
18 _currentDocument: { 18 _currentDocument: {
19 value : null 19 value : null
20 }, 20 },
21 21
22 currentDocument : { 22 currentDocument : {
23 get : function() { 23 get : function() {
24 return this._currentDocument; 24 return this._currentDocument;
25 }, 25 },
26 set : function(value) { 26 set : function(value) {
27 // If it's the same document, do nothing. 27 // If it's the same document, do nothing.
28 if (value === this._currentDocument) { 28 if (value === this._currentDocument) {
29 return; 29 return;
30 } 30 }
31 31
32 if(!this._currentDocument && value.currentView === "design") { 32 if(!this._currentDocument && value.currentView === "design") {
33 this.enablePanel(true); 33 this.enablePanel(true);
34 } 34 }
35 35
36 this._currentDocument = value; 36 this._currentDocument = value;
37 37
38 if(!value) { 38 if(!value) {
39 this._boolCacheArrays = false; 39 this._boolCacheArrays = false;
40 this.clearTimelinePanel(); 40 this.clearTimelinePanel();
41 this._boolCacheArrays = true; 41 this._boolCacheArrays = true;
42 this.enablePanel(false); 42 this.enablePanel(false);
43 } else if(this._currentDocument.currentView === "design") { 43 } else if(this._currentDocument.currentView === "design") {
44 this._boolCacheArrays = false; 44 this._boolCacheArrays = false;
45 this.clearTimelinePanel(); 45 this.clearTimelinePanel();
46 this._boolCacheArrays = true; 46 this._boolCacheArrays = true;
47 47
48 // Rebind the document events for the new document context 48 // Rebind the document events for the new document context
49 this._bindDocumentEvents(); 49 this._bindDocumentEvents();
50 50
51 // Initialize the timeline for the document. 51 // Initialize the timeline for the document.
52 this.initTimelineForDocument(); 52 this.initTimelineForDocument();
53 } 53 }
54 } 54 }
55 }, 55 },
56 56
57 _currentSelectedContainer: { 57 _currentSelectedContainer: {
58 value: null 58 value: null
59 }, 59 },
60 currentSelectedContainer: { 60 currentSelectedContainer: {
61 get: function() { 61 get: function() {
62 return this._currentSelectedContainer; 62 return this._currentSelectedContainer;
63 }, 63 },
64 set: function(newVal) { 64 set: function(newVal) {
65 if(this._currentSelectedContainer !== newVal) { 65 if(this._currentSelectedContainer !== newVal) {
66 this._currentSelectedContainer = newVal; 66 this._currentSelectedContainer = newVal;
67 if (this._ignoreNextContainerChange === true) { 67 if (this._ignoreNextContainerChange === true) {
68 this._ignoreNextContainerChange = false; 68 this._ignoreNextContainerChange = false;
69 return; 69 return;
70 } 70 }
71 this.application.ninja.currentDocument.setLevel = true; 71 this.application.ninja.currentDocument.setLevel = true;
72 72
73 if(this._currentDocument.currentView === "design") { 73 if(this._currentDocument.currentView === "design") {
74 this._boolCacheArrays = false; 74 this._boolCacheArrays = false;
75 this.clearTimelinePanel(); 75 this.clearTimelinePanel();
76 this._boolCacheArrays = true; 76 this._boolCacheArrays = true;
77 77
78 // Rebind the document events for the new document context 78 // Rebind the document events for the new document context
79 this._bindDocumentEvents(); 79 this._bindDocumentEvents();
80 80
81 // Initialize the timeline for the document. 81 // Initialize the timeline for the document.
82 this.initTimelineForDocument(); 82 this.initTimelineForDocument();
83 } 83 }
84 } 84 }
85 } 85 }
86 }, 86 },
87 87
88 _arrLayers:{ 88 _arrLayers:{
89 value:[] 89 value:[]
90 }, 90 },
91 91
92 arrLayers:{ 92 arrLayers:{
93 serializable:true, 93 serializable:true,
94 get:function () { 94 get:function () {
95 return this._arrLayers; 95 return this._arrLayers;
96 }, 96 },
97 set:function (newVal) { 97 set:function (newVal) {
98 this._arrLayers = newVal; 98 this._arrLayers = newVal;
99 this.needsDraw = true; 99 this.needsDraw = true;
100 this.cacheTimeline(); 100 this.cacheTimeline();
101 } 101 }
102 }, 102 },
103 103
104 _temparrLayers:{ 104 _temparrLayers:{
105 value:[] 105 value:[]
106 }, 106 },
107 107
108 temparrLayers:{ 108 temparrLayers:{
109 get:function () { 109 get:function () {
110 return this._temparrLayers; 110 return this._temparrLayers;
111 }, 111 },
112 set:function (newVal) { 112 set:function (newVal) {
113 this._temparrLayers = newVal; 113 this._temparrLayers = newVal;
114 } 114 }
115 }, 115 },
116 116
117 117
118 _layerRepetition:{ 118 _layerRepetition:{
119 value:null 119 value:null
120 }, 120 },
121 121
122 layerRepetition:{ 122 layerRepetition:{
123 get:function () { 123 get:function () {
124 return this._layerRepetition; 124 return this._layerRepetition;
125 }, 125 },
126 set:function (newVal) { 126 set:function (newVal) {
127 this._layerRepetition = newVal; 127 this._layerRepetition = newVal;
128 } 128 }
129 }, 129 },
130 130
131 // Set to false to skip array caching array sets in current document 131 // Set to false to skip array caching array sets in current document
132 _boolCacheArrays:{ 132 _boolCacheArrays:{
133 value:true 133 value:true
134 }, 134 },
135 135
136 _currentLayerNumber:{ 136 _currentLayerNumber:{
137 value:0 137 value:0
138 }, 138 },
139