svgo icon indicating copy to clipboard operation
svgo copied to clipboard

removeOffCanvasPaths breaks file

Open JoKalliauer opened this issue 2 years ago • 1 comments

Describe the bug removeOffCanvasPaths removes the yellow stars in china

To Reproduce Steps to reproduce the behavior:

  1. Open Input.svg in https://jakearchibald.github.io/svgomg/ and activate "Remove out-of-bounds path"

Expected behavior Input and Output should look the same.

  <defs>
    <path id="a" d="M0 1h.5L0 0z"/>
  </defs>

should not get deleted

Screenshots Input Input

Output Output

Desktop: https://jakearchibald.github.io/svgomg/

Licsense

source: https://commons.wikimedia.org/wiki/File:Flag-map_of_the_world.svg

author: https://commons.wikimedia.org/wiki/User:Transparent_6lue

license: Public Domain by the author

JoKalliauer avatar Jan 06 '23 01:01 JoKalliauer

Encountering the same problem. From my research it seems the intersects function is flawed #1646 . Maybe using a third party library can help #1289 . I might try to dig more into this if this function ends up to be crucial to my workflow.

Anyone has an idea or direction to handle this problem please share it.

hieuthi avatar Feb 12 '23 02:02 hieuthi