aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
authorJonathan Duran2012-02-08 16:12:58 -0800
committerJonathan Duran2012-02-08 16:12:58 -0800
commita8c16ca440b8ded3b78b59c767539e8c080680e7 (patch)
treeb95c8cbbd67051d8a4600d9d957106f733feb52b /js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
parent43dde98b9a2440097a6c237d5cec8a36bc64cbdf (diff)
downloadninja-a8c16ca440b8ded3b78b59c767539e8c080680e7.tar.gz
Squashed commit of the following:
commit 46292bddbfbe7415c6852142dd10fd02a276722a Author: Jon Reid <tjh487@motorola.com> Date: Wed Feb 8 14:32:22 2012 -0800 Timeline: turn off console logging. commit b8de88393182bc6e819c3d6a290ade2f804236ac Merge: e651344 37b952c Author: Jon Reid <tjh487@motorola.com> Date: Wed Feb 8 14:10:06 2012 -0800 Merge branch 'Timeline-jduran' into Timeline-jreid commit e651344d5d6c2911b31a54510c65a349c4d52db2 Author: Jon Reid <tjh487@motorola.com> Date: Wed Feb 8 14:08:25 2012 -0800 Timeline: Bug fixes IKNINJA-947: Weird behavior with adding layers with an empty layer name selected IKNINJA-990: Multiple styles can be highlighted at the same time even when they are under different layers IKNINJA-1063: Styles can be added while style column is collapsed IKNINJA-970: When there is no style added yet, the arrow sign should be in a collapsed mode Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js27
1 files changed, 21 insertions, 6 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 8f7c63bf..f56eaf74 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -184,7 +184,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
184 184
185 updateLayerScroll:{ 185 updateLayerScroll:{
186 value:function(){ 186 value:function(){
187 console.log(this.layout_tracks.scrollLeft)
188 this.user_layers.scrollTop = this.layout_tracks.scrollTop; 187 this.user_layers.scrollTop = this.layout_tracks.scrollTop;
189 this.layout_markers.scrollLeft = this.layout_tracks.scrollLeft; 188 this.layout_markers.scrollLeft = this.layout_tracks.scrollLeft;
190 } 189 }
@@ -257,8 +256,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
257 var ptrParent = nj.queryParentSelector(event.target, ".container-layer"); 256 var ptrParent = nj.queryParentSelector(event.target, ".container-layer");
258 if (ptrParent !== false) { 257 if (ptrParent !== false) {
259 // Why yes, the click was within a layer. But which one? 258 // Why yes, the click was within a layer. But which one?
260 var strLabel = ptrParent.querySelector(".label-layer .collapsible-label").innerText, 259 var myIndex = this.getActiveLayerIndex();
261 myIndex = this.getLayerIndexByName(strLabel);
262 this.selectLayer(myIndex); 260 this.selectLayer(myIndex);
263 } 261 }
264 } 262 }
@@ -345,7 +343,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
345 thingToPush.isMainCollapsed = true; 343 thingToPush.isMainCollapsed = true;
346 thingToPush.isPositionCollapsed = true; 344 thingToPush.isPositionCollapsed = true;
347 thingToPush.isTransformCollapsed = true; 345 thingToPush.isTransformCollapsed = true;
348 thingToPush.isStyleCollapsed = false; 346 thingToPush.isStyleCollapsed = true;
349 thingToPush.arrLayerStyles = []; 347 thingToPush.arrLayerStyles = [];
350 thingToPush.element=[]; 348 thingToPush.element=[];
351 thingToPush.deleted=false; 349 thingToPush.deleted=false;
@@ -764,7 +762,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
764 selectLayer : { 762 selectLayer : {
765 value: function(layerIndex) { 763 value: function(layerIndex) {
766 // Select a layer based on its index. 764 // Select a layer based on its index.
767 // use layerIndex = "none" to deselect all layers. 765 // use layerIndex = false to deselect all layers.
768 var i = 0, 766 var i = 0,
769 arrLayersLength = this.arrLayers.length; 767 arrLayersLength = this.arrLayers.length;
770 768
@@ -778,7 +776,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
778 } 776 }
779 777
780 // Next, update this.layerRepetition.selectedIndexes and this.currentLayerSelected. 778 // Next, update this.layerRepetition.selectedIndexes and this.currentLayerSelected.
781 if (layerIndex !== "none") { 779 if (layerIndex !== false) {
782 this.layerRepetition.selectedIndexes = [layerIndex]; 780 this.layerRepetition.selectedIndexes = [layerIndex];
783 this.currentLayerSelected = this.arrLayers[layerIndex] 781 this.currentLayerSelected = this.arrLayers[layerIndex]
784 } else { 782 } else {
@@ -824,6 +822,23 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
824 return returnVal; 822 return returnVal;
825 } 823 }
826 }, 824 },
825 getActiveLayerIndex : {
826 value: function() {
827 // Searches through the layers and looks for one that has
828 // set its isActive flag to true.
829 var i = 0,
830 returnVal = false,
831 arrLayersLength = this.arrLayers.length;
832
833 for (i = 0; i < arrLayersLength; i++) {
834 if (this.arrLayers[i].isActive === true) {
835 returnVal = i;
836 this.arrLayers[i].isActive = false;
837 }
838 }
839 return returnVal;
840 }
841 },
827 842
828 insertLayer: { 843 insertLayer: {
829 value: function() { 844 value: function() {