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

Add startOffset to supported SVG Attributes #5210

Closed
wants to merge 1 commit into from

Conversation

iuriikozuliak
Copy link

It's really handy for axis labels in pie/radar/etc charts.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@zpao
Copy link
Member

zpao commented Dec 23, 2015

cc @gaearon - I'm going to put you in charge of making sure anything else that isn't normal/hyphenated works :)

cf. #5714

@gaearon
Copy link
Collaborator

gaearon commented Dec 23, 2015

This will "just work" after #5714.
Everything that's not on our list will just pass through as is so I think we can safely close this.

@gaearon gaearon self-assigned this Dec 24, 2015
@gaearon
Copy link
Collaborator

gaearon commented Dec 25, 2015

Verified that startOffset is passed through in the master.

@gaearon gaearon closed this Dec 25, 2015
@tnrich
Copy link

tnrich commented Feb 24, 2016

Hey @gaearon , thanks for all the awesome work improving React's handling of SVG's. I'm running into an issue where it doesn't appear my startOffset is making it through to the dom:

Here's my JSX element with a startOffset attribute:

<text x='0' y='0'>
                             <textPath xlinkHref={`#${id}`} startOffset={"50%"}>
                                 {label}
                             </textPath>
                         </text>

And here's a snapshot of the DOM:

image

The xlink:href seems to make it through, but the startOffset doesn't. I'm using "react": "^0.14.3". Any ideas as to what might be going wrong? Thanks!

@gaearon
Copy link
Collaborator

gaearon commented Feb 24, 2016

I'm using "react": "^0.14.3".

This is fixed in master, but that master refers to v15 release.
It’s going to drop very soon so stay tuned!

Cheers.

@tnrich
Copy link

tnrich commented Feb 24, 2016

Good to hear, thanks very much! Until then your:

ref={(node) => {
                                      node && node.setAttribute("startOffset", '24%')
                                    }}

trick is working well :)

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

Successfully merging this pull request may close these issues.

5 participants