mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-24 11:44:39 +00:00
none flex layout use actual dimensions as width and height set
This commit is contained in:
+3
-2
@@ -62,7 +62,7 @@ class Svg extends Component{
|
||||
let opacity = +props.opacity;
|
||||
let width = +props.width;
|
||||
let height = +props.height;
|
||||
let flexLayout = !isNaN(width) || !isNaN(height);
|
||||
let flexLayout = isNaN(width) || isNaN(height);
|
||||
|
||||
let content = (props.viewbox && !flexLayout) ? <ViewBox
|
||||
viewbox={props.viewbox}
|
||||
@@ -83,7 +83,8 @@ class Svg extends Component{
|
||||
},
|
||||
!flexLayout && {
|
||||
width,
|
||||
height
|
||||
height,
|
||||
flex: 0
|
||||
}
|
||||
]}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user