diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 1310 |
1 files changed, 688 insertions, 622 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 033d0f79..556c082d 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,18 +64,18 @@ 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 | this.application.ninja.currentDocument.tlCurrentSelectedContainer=this.application.ninja.currentSelectedContainer; | |
72 | } | 72 | } |
73 | } | 73 | } |
74 | }, | 74 | }, |
75 | 75 | ||
76 | // Set to false to skip array caching array sets in current document | 76 | // Set to false to skip array caching array sets in current document |
77 | _boolCacheArrays : { | 77 | _boolCacheArrays:{ |
78 | value: true | 78 | value:true |
79 | }, | 79 | }, |
80 | 80 | ||
81 | _currentLayerNumber:{ | 81 | _currentLayerNumber:{ |
@@ -95,87 +95,86 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
95 | }, | 95 | }, |
96 | 96 | ||
97 | _setCurrentLayerNumber:{ | 97 | _setCurrentLayerNumber:{ |
98 | value:function(){ | 98 | value:function () { |
99 | if (this._boolCacheArrays) { | 99 | if (this._boolCacheArrays) { |
100 | this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; | 100 | this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; |
101 | } | 101 | } |
102 | } | 102 | } |
103 | }, | 103 | }, |
104 | 104 | ||
105 | _hashKey:{ | 105 | _currentLayerSelected:{ |
106 | value:0 | 106 | value:null |
107 | }, | ||
108 | currentLayerSelected:{ | ||
109 | get:function () { | ||
110 | return this._currentLayerSelected; | ||
107 | }, | 111 | }, |
112 | set:function (newVal) { | ||
113 | this._currentLayerSelected = newVal; | ||
114 | this.application.ninja.currentDocument.tlCurrentLayerSelected = newVal; | ||
115 | } | ||
116 | }, | ||
108 | 117 | ||
109 | hashKey:{ | 118 | _selectedLayerID:{ |
119 | value:false | ||
120 | }, | ||
121 | selectedLayerID:{ | ||
110 | get:function () { | 122 | get:function () { |
111 | return this._hashKey; | 123 | return this._selectedLayerID; |
112 | }, | 124 | }, |
113 | set:function (newVal) { | 125 | set:function (newVal) { |
114 | if (newVal !== this._hashKey) { | 126 | if (newVal === false) { |
115 | this._hashKey = newVal; | 127 | // We are clearing the timeline, so just set the value and return. |
116 | this._setHashKey(); | 128 | this._selectedLayerID = newVal; |
129 | return; | ||
130 | } | ||
131 | if (newVal !== this._selectedLayerID) { | ||
132 | var selectIndex = this.getLayerIndexByID(newVal); | ||
133 | this._selectedLayerID = newVal; | ||
134 | this._captureSelection = true; | ||
135 | this.selectLayer(selectIndex); | ||
117 | } | 136 | } |
118 | } | 137 | } |
119 | }, | 138 | }, |
120 | 139 | ||
121 | _setHashKey:{ | 140 | _millisecondsOffset:{ |
122 | value:function(){ | 141 | value:1000 |
123 | if (this._boolCacheArrays) { | ||
124 | this.application.ninja.currentDocument.hashKey = this.hashKey; | ||
125 | } | ||
126 | } | ||
127 | }, | 142 | }, |
128 | 143 | ||
129 | _currentLayerSelected:{ | 144 | millisecondsOffset:{ |
130 | value: null | 145 | get:function () { |
146 | return this._millisecondsOffset; | ||
131 | }, | 147 | }, |
132 | currentLayerSelected : { | 148 | set:function (newVal) { |
133 | get: function() { | 149 | if (newVal !== this._millisecondsOffset) { |
134 | return this._currentLayerSelected; | 150 | this._millisecondsOffset= newVal; |
135 | }, | 151 | this.drawTimeMarkers(); |
136 | set: function(newVal) { | 152 | NJevent('tlZoomSlider',this); |
137 | this._currentLayerSelected = newVal; | 153 | } |
138 | this.application.ninja.currentDocument.tlCurrentLayerSelected = newVal; | 154 | } |
139 | } | ||
140 | }, | 155 | }, |
141 | 156 | ||
142 | _selectedLayerID:{ | 157 | tweenarray:{ |
143 | value: false | 158 | value:[], |
144 | }, | 159 | writable:true |
145 | selectedLayerID : { | ||
146 | get: function() { | ||
147 | return this._selectedLayerID; | ||
148 | }, | ||
149 | set: function(newVal) { | ||
150 | if (newVal === false) { | ||
151 | // We are clearing the timeline, so just set the value and return. | ||
152 | this._selectedLayerID = newVal; | ||
153 | return; | ||
154 | } | ||
155 | if (newVal !== this._selectedLayerID) { | ||
156 | var selectIndex = this.getLayerIndexByID(newVal); | ||
157 | this._selectedLayerID = newVal; | ||
158 | this._captureSelection = true; | ||
159 | this.selectLayer(selectIndex, true); | ||
160 | } | ||
161 | } | ||
162 | }, | 160 | }, |
163 | 161 | ||
164 | millisecondsOffset:{ | 162 | tempArray:{ |
165 | value:1000 | 163 | value:[], |
164 | writable:true | ||
166 | }, | 165 | }, |
167 | 166 | ||
168 | _masterDuration:{ | 167 | _masterDuration:{ |
169 | serializable: true, | 168 | serializable:true, |
170 | value:0 | 169 | value:0 |
171 | }, | 170 | }, |
172 | 171 | ||
173 | masterDuration:{ | 172 | masterDuration:{ |
174 | serializable:true, | 173 | serializable:true, |
175 | get:function(){ | 174 | get:function () { |
176 | return this._masterDuration; | 175 | return this._masterDuration; |
177 | }, | 176 | }, |
178 | set:function(val){ | 177 | set:function (val) { |
179 | this._masterDuration = val; | 178 | this._masterDuration = val; |
180 | this.timebar.style.width = (this._masterDuration / 12) + "px"; | 179 | this.timebar.style.width = (this._masterDuration / 12) + "px"; |
181 | } | 180 | } |
@@ -225,18 +224,18 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
225 | }, | 224 | }, |
226 | 225 | ||
227 | _breadCrumbContainer:{ | 226 | _breadCrumbContainer:{ |
228 | value:null | 227 |