mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-06 21:13:17 +00:00
add clipping js code
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user