cetz.tree.tree(
// ...
draw-node: (node, p) => {
if node.content.text == "1" {circle((), radius: 0, name: "anchor_1")}
else if node.content.text == "2" {circle((), radius: 0, name: "anchor_2")}
}
)
line("anchor_1", "anchor_2")
Motivation: I want to draw arrows between sibling nodes in a tree.
Discussed in #698
Originally posted by noahjutz September 23, 2024
Is it possible to refer to a tree's node's position from outside of a tree?
When I try
I get
Assertion failed: Unknown element 'anchor_1' in elements ().Motivation: I want to draw arrows between sibling nodes in a tree.