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

Svg doesn't resize with viewbox. App crash if prop viewbox change to viewBox. #301

Closed
ghost opened this issue Apr 6, 2017 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Apr 6, 2017

I try to make svg with diffenrent size. It's default size is width="30", height="28". When using viewbox="0 0 100 100" svg doesn't change it width and height to 50, 50. It is possible to resize svg like that?

render() {
    return ( 
        <Svg width="50" height="50" viewbox="0 0 100 100">
            <Path fill={ color } d="..." </Path>
        </Svg>
    );
}

And app crash if prop viewbox change to viewBox.

@joemckie
Copy link

joemckie commented Apr 10, 2017

I'm having problems with the viewBox prop after upgrading to ^5.0.0, too. Changing it makes no difference yet it's being passed through to the native module just fine.

@markallancourtney
Copy link

I was experiencing this on Android while using
"react-native-svg": "^4.3.1"

After upgrading to
"react-native-svg": "5.1.7"
the Svg component resizes correctly in Android when the Svg height and width props changes.

@msand
Copy link
Collaborator

msand commented Feb 13, 2018

Can you try with the latest version or my PR #596
Viewbox is definitely working at least.

@msand msand closed this as completed Feb 13, 2018
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

3 participants