svg-path-editor
svg-path-editor copied to clipboard
Reset Viewbox
The reset viewbox functionality (as seen in download and reset zoom) doesn't work for my path:
m13 0c2 0 11 4 11 20 3 0 4-2 2-8 4 2 10 12 4 20 0 1 2 2 3 0 0 28-40 18-32-6 4-12 14-8 12-26z


Absolutely love this tool by the way 😄
Indeed, the default boundary is currently computed using only start and end points. This issue can occur with curves, quadratic curves and elliptical arcs.
Fixing it is a bit tricky, and requires some complicated maths 😅 .
Can you run getBBox()
https://stackoverflow.com/a/40316084/4907950
A bit of a hack, but indeed it should work. I will give a try.
Another idea: A button to quickly move it so the topmost and leftmost position is at 0,0. Currently, I would just go to export it, note the x and y values, and then translate the x and y negative that much so the export is at a viewbox of x and y at 0,0 and the width and height.