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

Apply translate transforms to shapes too #989

Open
silentroach opened this issue Jun 23, 2018 · 2 comments · May be fixed by #1854
Open

Apply translate transforms to shapes too #989

silentroach opened this issue Jun 23, 2018 · 2 comments · May be fixed by #1854

Comments

@silentroach
Copy link
Contributor

silentroach commented Jun 23, 2018

Now:

<svg xmlns="http://www.w3.org/2000/svg">
    <rect x="10" y="10" transform="translate(-10 -10)"/>
    <path d="M10 10z" transform="translate(-10 -10)"/>
</svg>

outputs to

<svg xmlns="http://www.w3.org/2000/svg">
    <rect x="10" y="10" transform="translate(-10 -10)"/>  <-- why not apply simple translates to shapes too?
    <path d="M0 0z"/>
</svg>
@silentroach silentroach changed the title transforms are applied to paths only Apply translate transforms to shapes too Jun 23, 2018
@silentroach
Copy link
Contributor Author

Tried to fix it by myself, but confused a little, how is it better to do it. Should I modify convertTransform plugin (js2transform and roundTransform are in this plugin) or should I write new one?

@GreLI
Copy link
Member

GreLI commented Jun 23, 2018

No certain place for now. But since convertPathData applies transforms to <path/>, it would be nice to have a separate plugin for the sake of consistency. (convertPathData should be splitted at best, but that a different topic.)

@KTibow KTibow linked a pull request Dec 2, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants