link insets
For parity with Plot.arrow. I don't think it's possible to do a good job with insets and curves other than linear (step-* and bump-x/y), so I've restricted insets to the linear curve.
cc: @yurivish
closes #920
Here's a build of the current code with the error removed: https://observablehq.com/@fil/link-inset-924
Is it acceptable? Is there any way we could make it better? (I don't think evaluating the tangent with getPointAtLength is an option—at least, it's not available with jsdom).
We can decide to punt on this until someone figures how to solve this.
Is it acceptable? Is there any way we could make it better?
I think it’s probably fine, and better that throwing an error. If we wanted to be fancier, you could do a switch statement on the curves and special case a few of them. e.g., bump-x and step should inset horizontally, while bump-y should inset vertically.
If you prefer, we could also ignore the inset option for unknown/unsupported (custom) curves. But I don’t think we should error.