aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html4
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js1098
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css2
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss2
4 files changed, 690 insertions, 416 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 19709ca7..5c957619 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -20,6 +20,7 @@
20 "track_container": {"#": "right_inside"}, 20 "track_container": {"#": "right_inside"},
21 "timeline_leftpane" : {"#" : "leftpane_inside"}, 21 "timeline_leftpane" : {"#" : "leftpane_inside"},
22 "layer_tracks": {"#": "layer_tracks"}, 22 "layer_tracks": {"#": "layer_tracks"},
23 "layout_tracks": {"#": "layout_tracks"},
23 "master_track": {"#": "master_track"}, 24 "master_track": {"#": "master_track"},
24 "time_markers" : {"#": "timeline_markers"}, 25 "time_markers" : {"#": "timeline_markers"},
25 "layerRepetition" : {"@": "repetition1"}, 26 "layerRepetition" : {"@": "repetition1"},
@@ -31,6 +32,7 @@
31 "container_tracks" : {"#" : "container-tracks"}, 32 "container_tracks" : {"#" : "container-tracks"},
32 "end_hottext" : {"@" : "endHottext"}, 33 "end_hottext" : {"@" : "endHottext"},
33 "container_layers" : {"#" : "container-layers"}, 34 "container_layers" : {"#" : "container-layers"},
35 "container_tracks" : {"#" : "container-tracks"},
34 "timeline_disabler" : {"#" : "timeline-disabler"}, 36 "timeline_disabler" : {"#" : "timeline-disabler"},
35 "checkable_relative" : {"#" : "checkable_relative"}, 37 "checkable_relative" : {"#" : "checkable_relative"},
36 "checkable_absolute" : {"#" : "checkable_absolute"}, 38 "checkable_absolute" : {"#" : "checkable_absolute"},
@@ -210,7 +212,7 @@
210 212
211 213
212 <div data-montage-id="layer_tracks" class="tl_layertracks"> 214 <div data-montage-id="layer_tracks" class="tl_layertracks">
213 <div class="layout-tracks"> 215 <div class="layout-tracks" data-montage-id="layout_tracks">
214 <div data-montage-id="playhead_marker" class="playheadmarker"></div> 216 <div data-montage-id="playhead_marker" class="playheadmarker"></div>
215 <div data-montage-id="master_track" class="mastertrack"> 217 <div data-montage-id="master_track" class="mastertrack">
216 <div data-montage-id="time_bar" class="timebar"></div> 218 <div data-montage-id="time_bar" class="timebar"></div>
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 6e9513f2..f35ce2d3 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -92,12 +92,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
92 this._layerRepetition = newVal; 92 this._layerRepetition = newVal;
93 } 93 }
94 }, 94 },
95
96 _areTracksScrolling: {
97 value: false
98 },
95 99
96 // Set to false to skip array caching array sets in current document 100 // Set to false to skip array caching array sets in currentDocument
97 _boolCacheArrays:{ 101 _boolCacheArrays:{
98 value:true 102 value:true
99 }, 103 },
100 104
105 // Current layer number: iterated and used to assign layer IDs.
101 _currentLayerNumber:{ 106 _currentLayerNumber:{
102 value:0 107 value:0
103 }, 108 },
@@ -126,36 +131,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
126 this.cacheTimeline(); 131 this.cacheTimeline();
127 } 132 }
128 }, 133 },
129 134 _currentElementsSelected: {
130 _selectedLayerID:{ 135 value: []
131 value:false
132 }, 136 },
133 selectedLayerID:{ 137 currentElementsSelected: {
134 get:function () { 138 get: function() {
135 return this._selectedLayerID; 139 return this._currentElementsSelected;
136 }, 140 },
137 set:function (newVal) { 141 set: function(newVal) {
138 if (newVal === false) { 142 this._currentElementsSelected = newVal;
139 // We are clearing the timeline, so just set the value and return. 143 this.cacheTimeline();
140 this._selectedLayerID = newVal; 144 }
141 return;
142 }
143 if (newVal !== this._selectedLayerID) {
144 var selectIndex = this.getLayerIndexByID(newVal);
145 this._selectedLayerID = newVal;
146 this._captureSelection = true;
147 if (this.currentLayerSelected !== false) {
148 this.selectLayer(selectIndex, false);
149 }
150 if (this.currentLayersSelected !== false) {
151 this.selectLayers(this.currentLayersSelected);
152 }
153 if ((this.currentLayersSelected === false) && (this.currentLayerSelected === false)) {
154 this.selectLayers([]);
155 }
156
157 }
158 }
159 }, 145 },
160 146
161 _currentLayersSelected:{ 147 _currentLayersSelected:{
@@ -171,6 +157,21 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
171 } 157 }
172 }, 158 },
173 159
160 // The index of the last layer that was clicked on
161 // (used for shift-click multiselect)
162 _lastLayerClicked : {
163 value: 0
164 },
165 lastLayerClicked: {
166 serializable: true,
167 get: function() {
168 return this._lastLayerClicked;
169 },
170 set: function(newVal) {
171 this._lastLayerClicked = newVal
172 }
173 },
174
174 _currentSelectedContainer: { 175 _currentSelectedContainer: {
175 value: null 176 value: null
176 }, 177 },
@@ -220,7 +221,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
220 }, 221 },
221 set:function (val) { 222 set:function (val) {
222 this._masterDuration = val; 223 this._masterDuration = val;
223 this.timebar.style.width = (this._masterDuration / 12) + "px"; 224 var intDur = Math.round(val/12),
225 strWidth = intDur + "px";
226 this.timebar.style.width = strWidth;
224 } 227 }
225 }, 228 },
226 229
@@ -280,10 +283,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
280 } 283 }
281 }, 284 },
282 285
283 _isLayer:{
284 value:false
285 },
286
287 _firstTimeLoaded:{ 286 _firstTimeLoaded:{
288 value:true 287 value:true
289 }, 288 },
@@ -299,6 +298,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
299 timeMarkerHolder:{ 298 timeMarkerHolder:{
300 value:null 299 value:null
301 }, 300 },
301
302 // Drag and Drop properties
302 _dragAndDropHelper : { 303 _dragAndDropHelper : {
303 value: false 304 value: false
304 }, 305 },
@@ -311,6 +312,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
311 _dragLayerID : { 312 _dragLayerID : {
312 value: null 313 value: null
313 }, 314 },
315 _draggingType: {
316 value: false
317 },
318 draggingType: {
319 get: function() {
320 return this._draggingType;
321 },
322 set: function(newVal) {
323 this._draggingType = newVal;
324 }
325 },
314 326
315 layersDragged:{ 327 layersDragged:{
316 value:[], 328 value:[],
@@ -327,6 +339,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
327 } 339 }
328 } 340 }
329 }, 341 },
342 _dragLayerIndexes: {
343 value: []
344 },
330 _dropLayerID : { 345 _dropLayerID : {
331 value: null 346 value: null
332 }, 347 },
@@ -338,20 +353,32 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
338 if (newVal !== this._dropLayerID) { 353 if (newVal !== this._dropLayerID) {
339 this._dropLayerID = newVal; 354 this._dropLayerID = newVal;
340 355
341