Rob @thatrobhuman.com · May 6

do you mean having the anchor target be an svg element? If so, that's not quite what I mean. I mean doing something like this (this is a bit simplified, of course) svg > path.connector { d: shape(from anchor(--socket-A center) line to anchor(--socket-B center)); }

2 likes 1 replies

?

Replies

Rob · May 6

The way I had to do this was to have a wrapper div with a resize observer that has its corners anchored to socket-A and socket-B. Inside that are two reference points, and an svg. On every resize observer cb, I find the position of the reference divs and re-draw the SVG path from scratch.