-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removeOffCanvasPaths removes wrong paths #1646
Labels
Comments
Another, more simple path to reproduce the same issue: const Svgo = require('svgo');
const { data } = Svgo.optimize(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path d="m10 5-5 5" stroke="#000"></path>
</svg>`,
{
plugins: [`removeOffCanvasPaths`],
}
);
console.log(data); As far as I could investigate, it fails this intersection check: svgo/plugins/removeOffCanvasPaths.js Line 131 in a9834ef
|
Here are a couple more examples that fail this, they are all quite similar though hope it helps when fixing this issue
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Plugin
removeOffCanvasPaths
removes paths that are on canvasTo Reproduce
Steps to reproduce the behavior:
Result:
Expected behavior
Expected path to not be removed. Path is within canvas.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: