[iOS] Fix Use element spec conformance (x and y interpretation)

This commit is contained in:
Mikael Sand
2019-01-14 15:03:28 +02:00
parent e183478466
commit ccb615dbca
4 changed files with 39 additions and 2 deletions
+7 -2
View File
@@ -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}
>