Skip to content

Commit

Permalink
Merge pull request #7 from noh-lab/ss_colors
Browse files Browse the repository at this point in the history
add switches to change canvas colors for different secretion systems
  • Loading branch information
bencap authored May 4, 2021
2 parents 36c706b + c8a85d3 commit 18a3cdd
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions bbqs_master/src/JBrowse/View/FeatureGlyph/Box.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,42 @@ return declare([ FeatureGlyph, FeatureLabelMixin], {

// background
var bgcolor = style( feature, 'color' );
if( bgcolor ) {
var f_name = feature.get('name').slice(0,2);
if( f_name == "T1"){
context.fillStyle = bgcolor;
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "T2"){
context.fillStyle = "blue";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "T3"){
context.fillStyle = "purple";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "T4"){
context.fillStyle = "red";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "T5"){
context.fillStyle = "green";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "T6"){
context.fillStyle = "yellow";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "Ta"){
context.fillStyle = "pink";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( f_name == "Fl"){
context.fillStyle = "teal";
context.fillRect( left, top, Math.max(1,width), height );
}
else if( bgcolor ) {
context.fillStyle = bgcolor;
context.fillRect( left, top, Math.max(1,width), height );

}
else {
context.clearRect( left, top, Math.max(1,width), height );
Expand Down

0 comments on commit 18a3cdd

Please sign in to comment.