nadavrot/layout

[Feature request] Make SVG arrowheads match the line color

Closed this issue · 1 comments

Hello,

Fairly simple problem: when I generate an SVG image with a directed edge that is some non-black color (e.g., red blue etc.), the arrow head that is generated seems to always be black. I did not see an option to change this via API.

I manually modified the output files and added fill="context-stroke" to each marker and that resolved it, while also allowing for multiple edge colors in the output graph. I hypothesize that it's as simple as modifying the static at this line to resolve this:

<polygon points="0 0, 10 3.5, 0 7" />

Happy to submit a PR myself if it is that simple, but I wasn't sure if there are some non-obvious issues with those changes.

Hi @holtjma , thanks for reporting the issue. Please submit a PR. Make sure to run cargo fmt before sending the patch. Thank you.