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

added support for some SVG tags #868

Closed
wants to merge 1 commit into from

Conversation

radebrecht
Copy link

added tags:

  • clipPath
  • symbol
  • use

added Attributes:

  • clipPath
  • xlinkHref

added tags:
- clipPath
- symbol
- use

added Attributes:
- clipPath
- xlinkHref
@the-kenny
Copy link

Support for image and animate* would be pretty nice too.

Also, are you sure that xlink:href attribute works as expected? When using the Dom-Api, you need to use setAttributeNS with the correct ns-uri to correctly set the attribute.

@plievone
Copy link
Contributor

Related: #830

@radebrecht
Copy link
Author

re: the-kenny

I agree, full svg support would be even better. Unfortunately I haven't got the time.
xlink:href works well in the example below. I'm not too clear on the whole namespace thing, do you have an example where my patch fails?

var Symbols=React.createClass({
    render: function(){
        return <defs>
            <symbol id="female">
            <circle cx="10" cy="10" r="10" style={{stroke:"black", fill:"white"}} />
            </symbol>
            </defs>;
    }
});

var SvgArea=React.createClass({
    render: function() {
        return (<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"  width={this.props.w} height={this.props.h}>
                <title> Symbol Test </title>
                <Symbols />
                <use xlinkHref="#female" x="200" y="200" />
                </svg>
               );
    }
});

@sophiebits
Copy link
Collaborator

@radebrecht Can you test whether changing the href (without unmounting the component) works properly? My guess is it won't.

@sophiebits
Copy link
Collaborator

Going to close this out due to lack of activity, but let me know if you get a chance to test the changing href.

@sophiebits sophiebits closed this Apr 12, 2014
caasi added a commit to g0v/zh-stroke-data that referenced this pull request Oct 27, 2014
- clipPath does not work at 0.11
  see: facebook/react#868
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 this pull request may close these issues.

4 participants