Skip to content

Commit

Permalink
sort facet titles alphabetically at the end of the track metadata ind…
Browse files Browse the repository at this point in the history
…exing
  • Loading branch information
rbuels committed May 9, 2012
1 parent d0086ac commit b18d437
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/Model/TrackMetaData.js
Expand Up @@ -50,13 +50,13 @@ dojo.declare( 'JBrowse.Model.TrackMetaData', null,
if( ! args.metadataStores || ! args.metadataStores.length ) {
// if we don't actually have any stores besides the track
// confs, we're ready now.
this._ready();
this._finishLoad();
} else {
// index the track metadata from each of the stores

var storeFetchFinished = dojo.hitch( this, function() {
if( ++stores_fetched_count == args.metadataStores.length )
this._ready();
this._finishLoad();
});
dojo.forEach( args.metadataStores, function(store) {
store.fetch({
Expand All @@ -83,7 +83,8 @@ dojo.declare( 'JBrowse.Model.TrackMetaData', null,
* our onReady callbacks.
* @private
*/
_ready: function() {
_finishLoad: function() {
this.facets = this.facets.sort();
this.ready = true;
dojo.forEach( this.onReadyFuncs, function(f) {
f.call( this, this );
Expand Down

0 comments on commit b18d437

Please sign in to comment.