From 112ba5f5beea03010d40a53a64bfa9595e0faa88 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Thu, 9 Feb 2012 09:09:01 -0800 Subject: Cleaning up more code and adding more models for timeline Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 6f0b0b58..3c4cfa2e 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -50,6 +50,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { } }, + currentLayerSelected:{ + value: null + }, + + currentTrackSelected:{ + value: null + }, + millisecondsOffset:{ value:1000 }, @@ -291,7 +299,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { handleNewLayer:{ value:function (event) { // Add a new layer. It should be added above the currently selected layer, - // Or at the end, if no layer is selected. + // Or at the top, if no layer is selected. var hashIndex = 0 , hashVariable = 0, layerResult, trackResult, layerObject, trackObject, dLayer, parentNode; this._arrLayersNonEmpty = true; @@ -520,8 +528,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { handleElementAdded:{ value:function (event) { this.currentLayerSelected.element.push(event.detail); - //console.log(this.currentLayerSelected.layerPosition); - //console.log(this.arrTracks); } }, @@ -719,10 +725,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Next, update this.layerRepetition.selectedIndexes and this.currentLayerSelected. if (layerIndex !== false) { this.layerRepetition.selectedIndexes = [layerIndex]; - this.currentLayerSelected = this.arrLayers[layerIndex] + this.trackRepetition.selectedIndexes = [layerIndex]; + this.currentLayerSelected = this.arrLayers[layerIndex]; + this.currentTrackSelected = this.arrTracks[layerIndex]; } else { this.layerRepetition.selectedIndexes = null; + this.trackRepetition.selectedIndexes = null; this.currentLayerSelected = null; + this.currentTrackSelected = null; } } }, -- cgit v1.2.3