Jollywatt / typst-fletcher

Typst package for drawing diagrams with arrows, built on top of CeTZ.
MIT License
341 stars 6 forks source link

fix: now nodes appear normally with edge crossing #14

Closed Andrew15-5 closed 7 months ago

Andrew15-5 commented 7 months ago

Previously with crossing: true edge's background stroke was drawn on top of nodes which is not a desirable result:

image

Now the nodes are drawn after the edges, which resolves this problem.

image

Now I noticed that with thick borders, the arrow is half missing. I think this is probably not a desired behavior and also should be fixed: the arrow should touch the node's border with just its tip so that the whole arrow head is visible.

Jollywatt commented 7 months ago

Thanks! I suppose in the future there should be a way to explicitly control the draw order of objects, like cetz’s draw.on-layer, because you might want edges to cross over nodes in some cases. But this is good for now