aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js336
1 files changed, 168 insertions, 168 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index da6f8595..c2dcd5ff 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -142,11 +142,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
142 return; 142 return;
143 } 143 }
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") {
@@ -155,7 +155,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
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
@@ -169,10 +169,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
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);
@@ -188,7 +188,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
188 } 188 }
189 } 189 }
190 }, 190 },
191 191
192 _currentSelectedContainer: { 192 _currentSelectedContainer: {
193 value: null 193 value: null
194 }, 194 },
@@ -204,15 +204,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
204 return; 204 return;
205 } 205 }
206 this.application.ninja.currentDocument.setLevel = true; 206 this.application.ninja.currentDocument.setLevel = true;
207 207
208 if(this._currentDocument.currentView === "design") { 208 if(this._currentDocument.currentView === "design") {
209 this._boolCacheArrays = false; 209 this._boolCacheArrays = false;
210 this.clearTimelinePanel(); 210 this.clearTimelinePanel();
211 this._boolCacheArrays = true; 211 this._boolCacheArrays = true;
212 212
213 // Rebind the document events for the new document context 213 // Rebind the document events for the new document context
214 this._bindDocumentEvents(); 214 this._bindDocumentEvents();
215 215
216 // Initialize the timeline for the document. 216 // Initialize the timeline for the document.
217 this.initTimelineForDocument(); 217 this.initTimelineForDocument();
218 } 218 }
@@ -262,15 +262,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
262 this._layerRepetition = newVal; 262 this._layerRepetition = newVal;
263 } 263 }
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 },
@@ -342,7 +342,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
342 this.cacheTimeline(); 342 this.cacheTimeline();
343 } 343 }
344 }, 344 },
345 345
346 _easingMenu: { 346 _easingMenu: {
347 value: null 347 value: null
348 }, 348 },
@@ -355,12 +355,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
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() {
@@ -476,7 +476,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
476 timeMarkerHolder:{ 476 timeMarkerHolder:{
477 value:null 477 value:null
478 }, 478 },
479 479
480 // Drag and Drop properties 480 // Drag and Drop properties
481 _dragAndDropHelper : { 481 _dragAndDropHelper : {
482 value: false 482 value: false
@@ -501,7 +501,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
501 this._draggingType = newVal; 501 this._draggingType = newVal;
502 } 502 }
503 }, 503 },
504 504
505 _elementsDragged: { 505 _elementsDragged: {
506 value: [] 506 value: []
507 }, 507 },
@@ -535,33 +535,33 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
535 set: function(newVal) { 535 set: function(newVal) {
536 if (newVal !== this._dropLayerID) { 536 if (newVal !== this._dropLayerID) {
537 this._dropLayerID = newVal; 537 this._dropLayerID = newVal;
538 538
539 var dropLayerIndex = this.getLayerIndexByID(newVal), 539 var dropLayerIndex = this.getLayerIndexByID(newVal),
540 i = 0, 540 i = 0,
541 dragLayerIndexesLength = this.currentLayersSelected.length, 541 dragLayerIndexesLength = this.currentLayersSelected.length,
542 dragAndDropDirection = 0, 542 dragAndDropDirection = 0,
543 targetIndex; 543 targetIndex;
544 544
545 if (dragLayerIndexesLength === 0) { 545 if (dragLayerIndexesLength === 0) {
546 // Nothing was dragged, so do nothing. 546 // Nothing was dragged, so do nothing.
547 return; 547 return;
548 } 548 }
549 549
550 // Is this a move up or down? 550 // Is this a move up or down?
551 if (this.currentLayersSelected[0] > dropLayerIndex) { 551 if (this.currentLayersSelected[0] > dropLayerIndex) {
552 dragAndDropDirection = -1; 552 dragAndDropDirection = -1;
553 } 553 }
554 targetIndex = dropLayerIndex + dragAndDropDirection; 554 targetIndex = dropLayerIndex + dragAndDropDirection;
555 555
556 // TODO: possibly we'll need to sort dragLayerIndexes so things don't get out of order? 556 // TODO: possibly we'll need to sort dragLayerIndexes so things don't get out of order?
557 557
558 // Get the target DOM element. 558 // Get the target DOM element.
559 if (typeof(this.arrLayers[targetIndex]) !== "undefined") { 559 if (typeof(this.arrLayers[targetIndex]) !== "undefined") {
560 this._layerDroppedInPlace = this.arrLayers[targetIndex].layerData.stageElement; 560 this._layerDroppedInPlace = this.arrLayers[targetIndex].layerData.stageElement;
561 } else { 561 } else {
562 this._layerDroppedInPlace = null; 562 this._layerDroppedInPlace = null;
563 } 563 }
564 564
565 // Splice 565 // Splice
566 for (i = 0; i < dragLayerIndexesLength; i++) { 566 for (i = 0; i < dragLayerIndexesLength; i++) {
567 var myDraggingLayer = this.arrLayers[this.currentLayersSelected[i]]; 567 var myDraggingLayer = this.arrLayers[this.currentLayersSelected[i]];
@@ -570,10 +570,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
570 this.arrLayers.splice(dropLayerIndex, 0, myDraggingLayer); 570 this.arrLayers.splice(dropLayerIndex, 0, myDraggingLayer);