mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-07 08:45:00 +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 opacity = +props.opacity;
|
||||||
let width = +props.width;
|
let width = +props.width;
|
||||||
let height = +props.height;
|
let height = +props.height;
|
||||||
let flexLayout = !isNaN(width) || !isNaN(height);
|
let flexLayout = isNaN(width) || isNaN(height);
|
||||||
|
|
||||||
let content = (props.viewbox && !flexLayout) ? <ViewBox
|
let content = (props.viewbox && !flexLayout) ? <ViewBox
|
||||||
viewbox={props.viewbox}
|
viewbox={props.viewbox}
|
||||||
@@ -83,7 +83,8 @@ class Svg extends Component{
|
|||||||
},
|
},
|
||||||
!flexLayout && {
|
!flexLayout && {
|
||||||
width,
|
width,
|
||||||
height
|
height,
|
||||||
|
flex: 0
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user