mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 01:00:43 +00:00
[iOS] Fix Use element spec conformance (x and y interpretation)
This commit is contained in:
+7
-2
@@ -14,7 +14,7 @@ export default class Use extends Shape {
|
||||
|
||||
render() {
|
||||
const { props } = this;
|
||||
const { children, width, height, href } = props;
|
||||
const { children, x, y, width, height, href } = props;
|
||||
|
||||
// match "url(#pattern)"
|
||||
const matched = href.match(idPattern);
|
||||
@@ -31,8 +31,13 @@ export default class Use extends Shape {
|
||||
return (
|
||||
<RNSVGUse
|
||||
ref={this.refMethod}
|
||||
{...extractProps(props, this)}
|
||||
{...extractProps(
|
||||
{ ...props, x: undefined, y: undefined },
|
||||
this,
|
||||
)}
|
||||
href={match}
|
||||
x={x}
|
||||
y={y}
|
||||
width={width}
|
||||
height={height}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user