Skip to content
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

Malformed path when using PathMerge with Path objects #69

Closed
0x2b3bfa0 opened this issue Feb 28, 2021 · 4 comments
Closed

Malformed path when using PathMerge with Path objects #69

0x2b3bfa0 opened this issue Feb 28, 2021 · 4 comments

Comments

@0x2b3bfa0
Copy link

It looks like using PathMerge with Path object is not supported and produces a malformed output:

Input

<PathMerge>
    <PathOne />
    <PathTwo />
</PathMerge>

Actual output

<path d="<path d=&quot;M201.337···&quot; merge></path><path d=&quot;M30.4869 ···&quot; merge></path>" />

Expected output

<path d="M201.337··· M30.4869 ···" />

Do you have plans to support this kind of operation?

@joemaddalone
Copy link
Owner

@0x2b3bfa0, more than happy to give this a look and see if it can be resolved. Can you provide a more detailed example of how to reproduce? Are PathOne & PathTwo the product of path.toComponent() ?

@joemaddalone
Copy link
Owner

ah - I think I have repo'd correctly

const PathOne = () => <path d="M0,0h100v100" stroke="red" />
const PathTwo = () => <path d="M0,0v100h100" stroke="green" />
const App = () => {
  return (
      <Svg width={500} height={500}>
        <PathMerge>
          <PathOne />
          <PathTwo />
        </PathMerge>
      </Svg>
  );
};

digging into it now.

@joemaddalone
Copy link
Owner

This is now fixed in v1.10.1

@0x2b3bfa0
Copy link
Author

🙏 Thank you very much, @joemaddalone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants