aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorJon Reid2012-03-15 15:59:01 -0700
committerJon Reid2012-03-15 15:59:01 -0700
commit134abd9a23c3ef3ef687051b5da7b94339ae8cad (patch)
tree759ca541f4b2255427c9b3be41532bfa469e8fe1 /js/panels
parent75dd0a2d333be1448f3f8bc0edd10f1c9199f84c (diff)
downloadninja-134abd9a23c3ef3ef687051b5da7b94339ae8cad.tar.gz
Timeline: Remove selection timer on add new layer method.
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js1
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js15
2 files changed, 11 insertions, 5 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 069d3c4b..5206ae16 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -260,6 +260,7 @@ var Layer = exports.Layer = Montage.create(Component, {
260 } 260 }
261 this._isSelected = value; 261 this._isSelected = value;
262 this.layerData.isSelected = value; 262 this.layerData.isSelected = value;
263 this.needsDraw = true;
263 } 264 }
264 265
265 } 266 }
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 45a90355..57288395 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -416,7 +416,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
416 } else { 416 } else {
417 // we do have information stored. Use it. 417 // we do have information stored. Use it.
418 this._boolCacheArrays = false; 418 this._boolCacheArrays = false;
419 this._captureSelection = true;
420 //var myIndex = 0; 419 //var myIndex = 0;
421 for (var i = 0; i < this.application.ninja.currentDocument.tlArrLayers.length; i++) { 420 for (var i = 0; i < this.application.ninja.currentDocument.tlArrLayers.length; i++) {
422 if ( this.application.ninja.currentDocument.tlArrLayers[i].layerData.isSelected === true ) { 421 if ( this.application.ninja.currentDocument.tlArrLayers[i].layerData.isSelected === true ) {
@@ -431,7 +430,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
431 this.hashInstance = this.application.ninja.currentDocument.tlLayerHashTable; 430 this.hashInstance = this.application.ninja.currentDocument.tlLayerHashTable;
432 this.hashElementMapToLayer = this.application.ninja.currentDocument.tlElementHashTable; 431 this.hashElementMapToLayer = this.application.ninja.currentDocument.tlElementHashTable;
433 this.hashKey = this.application.ninja.currentDocument.hashKey; 432 this.hashKey = this.application.ninja.currentDocument.hashKey;
434 this._boolCacheArrays = true; 433
435 } 434 }
436 } 435 }
437 }, 436 },
@@ -687,6 +686,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
687 thingToPush.layerData.layerID = this.currentLayerNumber; 686 thingToPush.layerData.layerID = this.currentLayerNumber;
688 thingToPush.parentElementUUID = this.hashKey; 687 thingToPush.parentElementUUID = this.hashKey;
689 thingToPush.parentElement = this.application.ninja.currentSelectedContainer; 688 thingToPush.parentElement = this.application.ninja.currentSelectedContainer;
689 thingToPush.layerData.isSelected = true;
690 thingToPush.layerData._isFirstDraw = true;
691
692 for (var i = 0; i < this.arrLayers.length; i++) {
693 this.arrLayers[i].layerData.isSelected = false;
694 this.arrLayers[i].layerData._isFirstDraw = false;
695 }
690 696
691 if (!!this.layerRepetition.selectedIndexes) { 697 if (!!this.layerRepetition.selectedIndexes) {
692 // There is a selected layer, so we need to splice the new 698 // There is a selected layer, so we need to splice the new
@@ -712,7 +718,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
712 this._LayerUndoObject = thingToPush; 718 this._LayerUndoObject = thingToPush;
713 this._LayerUndoIndex = thingToPush.layerData.layerID; 719 this._LayerUndoIndex = thingToPush.layerData.layerID;
714 this._LayerUndoStatus = true; 720 this._LayerUndoStatus = true;
715 721/*
716 this._captureSelection = true; 722 this._captureSelection = true;
717 723
718 // TODO: Find a better solution than a timout here. 724 // TODO: Find a better solution than a timout here.
@@ -720,7 +726,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
720 setTimeout(function() { 726 setTimeout(function() {
721 that.selectLayer(indexToSelect, true); 727 that.selectLayer(indexToSelect, true);
722 }, 500); 728 }, 500);
723 729*/
724 } 730 }
725 731
726 } 732 }
@@ -1031,7 +1037,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1031 } 1037 }
1032 } 1038 }
1033 1039
1034
1035 this.layerRepetition.selectedIndexes = [layerIndex]; 1040 this.layerRepetition.selectedIndexes = [layerIndex];
1036 this.currentLayerSelected = this.arrLayers[layerIndex]; 1041 this.currentLayerSelected = this.arrLayers[layerIndex];
1037 if(userSelection){ 1042 if(userSelection){