Refactor svg bounds extraction

This commit is contained in:
Mikael Sand
2019-01-06 19:38:47 +02:00
parent 2ced02c93c
commit 35dca0d98f
+2 -5
View File
@@ -102,16 +102,13 @@ class Svg extends Shape {
flex: 0, flex: 0,
} : null; } : null;
const w = String(width);
const h = String(height);
return ( return (
<NativeSvgView <NativeSvgView
{...props} {...props}
bbWidth={w}
bbHeight={h}
tintColor={color} tintColor={color}
onLayout={onLayout} onLayout={onLayout}
bbWidth={String(width)}
bbHeight={String(height)}
{...extractResponder(props, this)} {...extractResponder(props, this)}
{...extractViewBox({ viewBox, preserveAspectRatio })} {...extractViewBox({ viewBox, preserveAspectRatio })}
ref={ele => { ref={ele => {