'Is there D3 way to manage a symbol's insertion point?
I have made an SVG in Adobe Illustrator, and it uses quite a lot of symbols (as illustrator calls them) which convert to use elements in an exported SVG.

The ⚫ is the insertion point. The intersection of the lines is the desired insertion point
During that export, the insertion point is moved from the illustrator location to the bottom left corner. (It also seems to rotate it 180°, but that's changed back again by adding a transform. Very confusing.)
Is there a D3 way to move the insertion point back to where I'd like it to be? So far, I've got most of the way there*, but it's not quite working. My current approach is:
- Move each instance to the original insertion point
- Move the view box of the symbol definition to be centred on the new insertion point
- Move the internals of the symbol back into the right place
This is a surprising amount of work, and it feels like the kind of thing that someone else has done before me. The reason I want to do the transform on the symbol is that it drastically simplifies all downstream work because the insertion point is the only geometry data I need to store from then on.
Ideally, there'd be a way to export from Illustrator with the correct, untransformed, origin, but I'm not holding out much hope.
I'm open to the idea of using something else (inkscape etc.) to draw the source file if it's a hard problem.

* once I get this code working, I'll put it in as an answer, but for the moment it's too ugly to make any sense.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
