diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 710 |
1 files changed, 251 insertions, 459 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 3e82a760..191228af 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -19,12 +19,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
19 | 19 | ||
20 | /* === BEGIN: Models === */ | 20 | /* === BEGIN: Models === */ |
21 | _arrLayers:{ | 21 | _arrLayers:{ |
22 | serializable: true, | 22 | serializable:true, |
23 | value:[] | 23 | value:[] |
24 | }, | 24 | }, |
25 | 25 | ||
26 | arrLayers:{ | 26 | arrLayers:{ |
27 | serializable: true, | 27 | serializable:true, |
28 | get:function () { | 28 | get:function () { |
29 | return this._arrLayers; | 29 | return this._arrLayers; |
30 | }, | 30 | }, |
@@ -50,12 +50,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
50 | 50 | ||
51 | 51 | ||
52 | _layerRepetition:{ | 52 | _layerRepetition:{ |
53 | serializable: true, | 53 | serializable:true, |
54 | value:null | 54 | value:null |
55 | }, | 55 | }, |
56 | 56 | ||
57 | layerRepetition:{ | 57 | layerRepetition:{ |
58 | serializable: true, | 58 | serializable:true, |
59 | get:function () { | 59 | get:function () { |
60 | return this._layerRepetition; | 60 | return this._layerRepetition; |
61 | }, | 61 | }, |
@@ -64,17 +64,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
64 | } | 64 | } |
65 | }, | 65 | }, |
66 | 66 | ||
67 | _cacheArrays : { | 67 | _cacheArrays:{ |
68 | value: function() { | 68 | value:function () { |
69 | if (this._boolCacheArrays) { | 69 | if (this._boolCacheArrays) { |
70 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; | 70 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; |
71 | } | 71 | } |
72 | } | 72 | } |
73 | }, | 73 | }, |
74 | 74 | ||
75 | // Set to false to skip array caching array sets in current document | 75 | // Set to false to skip array caching array sets in current document |
76 | _boolCacheArrays : { | 76 | _boolCacheArrays:{ |
77 | value: true | 77 | value:true |
78 | }, | 78 | }, |
79 | 79 | ||
80 | _currentLayerNumber:{ | 80 | _currentLayerNumber:{ |
@@ -94,7 +94,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
94 | }, | 94 | }, |
95 | 95 | ||
96 | _setCurrentLayerNumber:{ | 96 | _setCurrentLayerNumber:{ |
97 | value:function(){ | 97 | value:function () { |
98 | if (this._boolCacheArrays) { | 98 | if (this._boolCacheArrays) { |
99 | this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; | 99 | this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; |
100 | } | 100 | } |
@@ -103,8 +103,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
103 | 103 | ||
104 | // TODO - Remove hash tables | 104 | // TODO - Remove hash tables |
105 | _hashKey:{ | 105 | _hashKey:{ |
106 | value:0 | 106 | value:0 |
107 | }, | 107 | }, |
108 | 108 | ||
109 | hashKey:{ | 109 | hashKey:{ |
110 | get:function () { | 110 | get:function () { |
@@ -119,7 +119,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
119 | }, | 119 | }, |
120 | 120 | ||
121 | _setHashKey:{ | 121 | _setHashKey:{ |
122 | value:function(){ | 122 | value:function () { |
123 | if (this._boolCacheArrays) { | 123 | if (this._boolCacheArrays) { |
124 | this.application.ninja.currentDocument.hashKey = this.hashKey; | 124 | this.application.ninja.currentDocument.hashKey = this.hashKey; |
125 | } | 125 | } |
@@ -128,38 +128,38 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
128 | 128 | ||
129 | 129 | ||
130 | _currentLayerSelected:{ | 130 | _currentLayerSelected:{ |
131 | value: null | 131 | value:null |
132 | }, | 132 | }, |
133 | currentLayerSelected : { | 133 | currentLayerSelected:{ |
134 | get: function() { | 134 | get:function () { |
135 | return this._currentLayerSelected; | 135 | return this._currentLayerSelected; |
136 | }, | 136 | }, |
137 | set: function(newVal) { | 137 | set:function (newVal) { |
138 | this._currentLayerSelected = newVal; | 138 | this._currentLayerSelected = newVal; |
139 | this.application.ninja.currentDocument.tlCurrentLayerSelected = newVal; | 139 | this.application.ninja.currentDocument.tlCurrentLayerSelected = newVal; |
140 | } | 140 | } |
141 | }, | 141 | }, |
142 | 142 | ||
143 | _selectedLayerID:{ | 143 | _selectedLayerID:{ |
144 | value: false | 144 | value:false |
145 | }, | 145 | }, |
146 | selectedLayerID : { | 146 | selectedLayerID:{ |
147 | get: function() { | 147 | get:function () { |
148 | return this._selectedLayerID; | 148 | return this._selectedLayerID; |
149 | }, | 149 | }, |
150 | set: function(newVal) { | 150 | set:function (newVal) { |
151 | if (newVal === false) { | 151 | if (newVal === false) { |
152 | // We are clearing the timeline, so just set the value and return. | 152 | // We are clearing the timeline, so just set the value and return. |
153 | this._selectedLayerID = newVal; | 153 | this._selectedLayerID = newVal; |
154 | return; | 154 | return; |
155 | } | 155 | } |
156 | if (newVal !== this._selectedLayerID) { | 156 | if (newVal !== this._selectedLayerID) { |
157 | var selectIndex = this.getLayerIndexByID(newVal); | 157 | var selectIndex = this.getLayerIndexByID(newVal); |
158 | this._selectedLayerID = newVal; | 158 | this._selectedLayerID = newVal; |
159 | this._captureSelection = true; | 159 | this._captureSelection = true; |
160 | this.selectLayer(selectIndex); | 160 | this.selectLayer(selectIndex); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | }, | 163 | }, |
164 | 164 | ||
165 | millisecondsOffset:{ | 165 | millisecondsOffset:{ |
@@ -167,16 +167,16 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
167 | }, | 167 | }, |
168 | 168 | ||
169 | _masterDuration:{ | 169 | _masterDuration:{ |
170 | serializable: true, | 170 | serializable:true, |
171 | value:0 | 171 | value:0 |
172 | }, | 172 | }, |
173 | 173 | ||
174 | masterDuration:{ | 174 | masterDuration:{ |
175 | serializable:true, | 175 | serializable:true, |
176 | get:function(){ | 176 | get:function () { |
177 | return this._masterDuration; | 177 | return this._masterDuration; |
178 | }, | 178 | }, |
179 | set:function(val){ | 179 | set:function (val) { |
180 | this._masterDuration = val; | 180 | this._masterDuration = val; |
181 | this.timebar.style.width = (this._masterDuration / 12) + "px"; | 181 | this.timebar.style.width = (this._masterDuration / 12) + "px"; |
182 | } | 182 | } |
@@ -226,15 +226,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
226 | }, | 226 | }, |
227 | 227 | ||
228 | _breadCrumbContainer:{ | 228 | _breadCrumbContainer:{ |
229 | value:null | 229 | value:null |
230 | }, | 230 | }, |
231 | 231 | ||
232 | breadCrumbContainer: { | 232 | breadCrumbContainer:{ |
233 | get: function() { | 233 | get:function () { |
234 | return this._breadCrumbContainer; | 234 | return this._breadCrumbContainer; |
235 | }, | 235 | }, |
236 | set: function(value) { | 236 | set:function (value) { |
237 | if(this._breadCrumbContainer !== value) { | 237 | if (this._breadCrumbContainer !== value) { |
238 | this._breadCrumbContainer = value; | 238 | this._breadCrumbContainer = value; |
239 | this.LayerBinding(this.application.ninja.currentSelectedContainer); | 239 | this.LayerBinding(this.application.ninja.currentSelectedContainer); |
240 | } | 240 | } |
@@ -261,7 +261,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
261 | }, | 261 | }, |
262 | 262 | ||