d2 icon indicating copy to clipboard operation
d2 copied to clipboard

support `link` on connections

Open alixander opened this issue 1 year ago • 2 comments

the text points to whatever the link is

alixander avatar Feb 04 '24 19:02 alixander

In the compiler, the Link keyword is applied here. Just need to do that for Edges too. https://github.com/terrastruct/d2/blob/master/d2graph/d2graph.go#L131

And then the exporter needs to take that value from the compiler and read it, like Shape does: https://github.com/terrastruct/d2/blob/master/d2exporter/export.go#L198

And then rendered in the SVG with an tag: https://github.com/terrastruct/d2/blob/master/d2renderers/d2svg/d2svg.go#L909

alixander avatar Feb 04 '24 20:02 alixander

Dup of https://github.com/terrastruct/d2/issues/1497

huyz avatar Sep 05 '24 09:09 huyz