Yqnn / svg-path-editor

Online editor to create and manipulate SVG paths
https://yqnn.github.io/svg-path-editor/
Apache License 2.0
4.04k stars 326 forks source link

Suggestion: Optimize relative / absolute #132

Closed justingolden21 closed 1 week ago

justingolden21 commented 5 months ago

Instead of convert all to relative or all to absolve, if there was a third button to optimize, that would be helpful. I realize it's not as easy as checking each individual command since sometimes it depends on adjacent commands (for example lines in a row).

A bonus (but certainly not expected) would be to convert all horizontal and vertical l to h and v, and another would be to check for z when a path is already closed and if it ends in a l, h, or v then delete that command, else delete the z.

Yqnn commented 1 week ago

Done in #136