Skip to content

Commit

Permalink
Internal nodes font colors are correct
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpenel committed May 22, 2024
1 parent 6f9f06d commit aed17a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "light_phylogeny"
version = "2.2.1"
version = "2.2.2"
authors = ["Simon Penel <[email protected]>"]
edition = "2018"
description ="Methods and functions for phylogeny."
Expand Down
9 changes: 8 additions & 1 deletion src/drawing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,14 @@ pub fn draw_sptree_gntrees (
let mut element = Element::new("text");
element.assign("x", index.x+10.0);
element.assign("y", index.y+0.0);
element.assign("class", "gene_".to_owned() + &idx_rcgen.to_string());
if options.node_colors.len() > 0 {
// Mode coloration par noeud
element.assign("class", "node_".to_owned() + &index.color_node_idx.to_string());
}
else {
// Mode coloration par gene
element.assign("class", "gene_".to_owned() + &idx_rcgen.to_string());
}
let txt = Text::new(&index.name);
element.append(txt);
element.assign("transform","rotate(90 ".to_owned()
Expand Down

0 comments on commit aed17a5

Please sign in to comment.