Skip to content

Commit

Permalink
put a copy of the track conf in the trackmetadata item for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed May 4, 2012
1 parent 434927a commit 08bbab7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/Model/TrackMetaData.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ dojo.declare( 'JBrowse.Model.TrackMetaData', null,

// set up our facet name discrimination: what facets we will
// actually provide search on
var ident_attrs = this.getIdentityAttributes();
var non_facet_attrs = this.getIdentityAttributes();
non_facet_attrs.push('conf');
this._filterFacet = function( facetName ) {
var userfilter = args.filterFacets || function() {return true;};
return userfilter(facetName)
&& ! dojo.some( ident_attrs, function(i) { return i == facetName;});
&& ! dojo.some( non_facet_attrs, function(a) { return a == facetName;});
};

// set up our onReady callbacks
Expand All @@ -33,9 +34,10 @@ dojo.declare( 'JBrowse.Model.TrackMetaData', null,
{
store: this,
items: dojo.map( args.trackConfigs, function(conf) {
var metarecord = conf.metadata || {};
var metarecord = dojo.clone( conf.metadata || {} );
metarecord.label = conf.label;
metarecord.key = conf.key;
metarecord.conf = conf;
return metarecord;
})
}
Expand Down

0 comments on commit 08bbab7

Please sign in to comment.