add clipping js code

This commit is contained in:
Horcrux
2016-04-21 15:44:25 +08:00
parent c8aaa1eb12
commit fa1aea094a
19 changed files with 78 additions and 29 deletions

View File

@@ -19,7 +19,13 @@ const transformProps = {
originX: null,
originY: null
};
import extractProps from '../lib/extractProps';
const clipProps = {
clipPath: null,
clipRule: null
};
import extractProps from '../lib/extract/extractProps';
class G extends Component{
static displayName = 'G';
@@ -28,6 +34,7 @@ class G extends Component{
return Children.map(this.props.children, child => cloneElement(child, {
...this.props,
...transformProps,
...clipProps,
...child.props,
id: null
}));
@@ -54,6 +61,7 @@ class G extends Component{
}
}
}
var NativeGroup = createReactNativeComponentClass({
validAttributes: GroupAttributes,
uiViewClassName: 'RNSVGGroup'