mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-06 16:32:24 +00:00
Refactor svg bounds extraction
This commit is contained in:
+2
-5
@@ -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 => {
|
||||||
|
|||||||
Reference in New Issue
Block a user