Skip to content

Commit

Permalink
use new css style, rather than manually altering colour
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmirob committed Feb 27, 2013
1 parent 7a48151 commit ce8641b
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/JBrowse/View/Track/HTMLFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,8 @@ var HTMLFeatures = declare( [ BlockBased, YScaleMixin, ExportMixin, FeatureDetai
if ( sourceSlot.booleanCovs.hasOwnProperty(key) ) {
featDiv.appendChild( sourceSlot.booleanCovs[key] );
}}
var color = window.getComputedStyle
? window.getComputedStyle(featDiv).backgroundColor
: (function(){console.error('Browser does not support "getComputedStyle"'); return 'rgb(0,0,0)'});
color = 'rgba('+ color.split('(')[1].split(')')[0].split(',') +', '+sourceSlot.booleanAlpha +')';
featDiv.style['background-color'] = color;

featDiv.className = 'HTML-boolean-transparent';
featDiv.booleanCovs = sourceSlot.booleanCovs;
featDiv.booleanAlpha = sourceSlot.booleanAlpha;
}
Expand Down Expand Up @@ -631,12 +628,8 @@ var HTMLFeatures = declare( [ BlockBased, YScaleMixin, ExportMixin, FeatureDetai
}
}}

// change the opacity. (in future, change class type, rather than the div's style attributes)
var color = window.getComputedStyle
? window.getComputedStyle(feat).backgroundColor
: (function(){console.error('Browser does not support "getComputedStyle"'); return 'rgb(0,0,0)'});
color = 'rgba('+ color.split('(')[1].split(')')[0].split(',') +', '+alpha+')';
feat.style['background-color'] = color;
feat.className = 'HTML-boolean-transparent';
console.log(feat.className);
}}
}}
},
Expand Down

0 comments on commit ce8641b

Please sign in to comment.