-
Notifications
You must be signed in to change notification settings - Fork 352
Support for attributes on <use> and importNode usage #152
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
Conversation
- extended embed to copy all existing attributes to outer g - relaxing eslint rule to allow params more than 3
I just tried this out and found a few small problems with it. First I realized that it doesn't solve #145 completely. @BenDTU mentioned the x and y attributes. Those are copied to the g tag but it doesn't support them. This was also a problem in #122 which I didn't notice. I also found another interesting Problem. If I have multiple use tags linking the same icon they all get the attributes from the last use tag linking it. Aside from the mentioned problems it works for me. |
@Eschon thanks for giving it a go. Re: x, y, I think that should be tackled on as a separate PR. Re: multiple |
Sorry it took me such a long time to get back to this. |
What is about this PR? I would love to see it in! |
<use>
embeds in<g>
and copying relevant attributes to<g>
(Based on if use element has additional attributes, they will be copied to a new group element #122)document.importNode
if available, fallback tocloneNode
otherwise (Based on Using importNode instead cloneNode. #113)href
fromxlink:href
max-param