Skip to content

Commit

Permalink
give subfeatures type-specific classnames regardless of whether `styl…
Browse files Browse the repository at this point in the history
…e.subfeatureClasses` is defined
  • Loading branch information
rbuels committed Aug 10, 2012
1 parent 1b68cfd commit 33949dd
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/JBrowse/View/Track/HTMLFeatures.js
Expand Up @@ -1027,17 +1027,15 @@ var HTMLFeatures = declare( BlockBased,

var subDiv = document.createElement("div");

if( this.config.style.subfeatureClasses ) {
var type = subfeature.get('type');
subDiv.className = this.config.style.subfeatureClasses[type] || this.config.style.className + '-' + type;
switch ( subfeature.get('strand') ) {
case 1:
case '+':
subDiv.className += " plus-" + subDiv.className; break;
case -1:
case '-':
subDiv.className += " minus-" + subDiv.className; break;
}
var type = subfeature.get('type');
subDiv.className = (this.config.style.subfeatureClasses||{})[type] || this.config.style.className + '-' + type;
switch ( subfeature.get('strand') ) {
case 1:
case '+':
subDiv.className += " plus-" + subDiv.className; break;
case -1:
case '-':
subDiv.className += " minus-" + subDiv.className; break;
}

// if the feature has been truncated to where it doesn't cover
Expand Down

0 comments on commit 33949dd

Please sign in to comment.