veg / phylotree.js

Interactive viewer of phylogenetic trees
http://phylotree.hyphy.org
MIT License
168 stars 72 forks source link

Node text should be colored with "fill", not "stroke" #409

Open 524D opened 2 years ago

524D commented 2 years ago

In the Unscaled IAV HA colored by host example, the color of the node text is set by SVG property stroke (the last line with code in function colorNodesByName). This should be the fill property.

The stroke property sets the color of the outline of the fonts, not the fonts themselves. The results in distorted text and and different colored pixels inside the characters (with larger font size). The fill property sets the font color. Picture below has stroke on left side, fill on right.

stroke-vs-fill

spond commented 2 years ago

Dear @524D,

Thanks for pointing this out! Much appreciated. I fixed the example at https://observablehq.com/@spond/phylotree-1-0-0-unscaled-iav-ha-colored-by-host

Tagging @stevenweaver so that he can merge into his notebook.

Best, Sergei