Skip to content

Group makes Defs not working #32

@pietgk

Description

@pietgk

This works ios and android:

            <Defs>
              <LinearGradient id="outerGr" x1="0" y1="0" x2="110" y2="0">
                <Stop offset="0" stopColor="black" stopOpacity="1" />
                <Stop offset="1" stopColor="#4d4d4d" stopOpacity="1" />
              </LinearGradient>
            </Defs>
            <Circle id="outerCircle" cx="50" "cy"=50 "r"=50 fill="url(#outerGr)" />


This does not work:

             <Defs>
               <LinearGradient id="outerGr" x1="0" y1="0" x2="110" y2="0">
                <Stop offset="0" stopColor="black" stopOpacity="1" />
                <Stop offset="1" stopColor="#4d4d4d" stopOpacity="1" />
               </LinearGradient>
            </Defs> 
            <G> 
              <Circle id="outerCircle" cx="50" "cy"=50 "r"=50 fill="url(#outerGr)" />
            </G>

Circle used as example, other like f.e. Polygon also behave the same.

I'm using react-native 0.24 and react-native-svg 1.2.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions