-
-
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
fix: mergePaths should not merge paths with styles that depend on bounding box #1964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left one minor comment, but overall this looks good. Thanks for spotting the issue and submitting a patch.
Co-authored-by: Seth Falco <seth@falco.fun>
I'm a bit late here but this "is the path bounding box sensitive?" logic would be useful for #1951, and I'm going to move it to a function to reduce duplication. Which file would that function best fit in? |
@KTibow Nothing shouts out to me, so I'd default to |
This PR fixes the problem raised in issue #1267. The general issue is that merging paths into a single element changes the bounding box, so any style that depends on the bounding box of the element may change behavior. This PR disables merging for any paths that have:
It's possible that there are other scenarios where merging should be disabled, but those above are the only ones that I was able to construct a test case for so far.
With the current regression settings, there is no change in pixel mismatches in the regressions. With the Oxygen files, only one file seems to be affected - scalable/status/weather-few-clouds-night.svg. The clouds were rendered incorrectly in the optimized version before the fix.
Closes #1267