Skip to content

Commit

Permalink
make tracklists decide what they render to; just give them full acces…
Browse files Browse the repository at this point in the history
…s to the Browser object
  • Loading branch information
rbuels committed May 1, 2012
1 parent b3c0f22 commit 67455f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions js/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Browser.prototype.initView = function() {
dojo.connect( this.view, "onCoarseMove", this, "onCoarseMove" );

//set up track list
var trackListDiv = this.createTrackList( this.container );
var trackListDiv = this.createTrackList();
this.containerWidget.startup();
dojo.connect( this.browserWidget, "resize", this, 'onResize' );
dojo.connect( this.browserWidget, "resize", this.view, 'onResize' );
Expand Down Expand Up @@ -417,7 +417,7 @@ Browser.prototype.onFineMove = function(startbp, endbp) {
* @private
*/

Browser.prototype.createTrackList = function( /**Element*/ parent ) {
Browser.prototype.createTrackList = function() {

if( ! this.config.tracks )
this.config.tracks = [];
Expand Down Expand Up @@ -446,7 +446,6 @@ Browser.prototype.createTrackList = function( /**Element*/ parent ) {
// instantiate the tracklist
this.trackListView = new resolved_tl_class( {
trackConfigs: this.config.tracks,
renderTo: parent,
browser: this
});

Expand Down
2 changes: 1 addition & 1 deletion js/View/TrackList/Simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dojo.declare( 'JBrowse.View.TrackList.Simple', null,
constructor: function( args ) {

// make the track list DOM nodes and widgets
this.createTrackList( args.renderTo );
this.createTrackList( args.browser.container );

// populate our track list (in the right order)
this.trackListWidget.insertNodes(
Expand Down

0 comments on commit 67455f0

Please sign in to comment.