Add touch events support for G elements

This commit is contained in:
Horcrux
2016-07-31 22:01:14 +08:00
parent 803d164b64
commit 6c7c2fdf3f
6 changed files with 27 additions and 22 deletions
+5 -10
View File
@@ -1,10 +1,11 @@
import React, {Component} from 'react';
import React from 'react';
import createReactNativeComponentClass from 'react/lib/createReactNativeComponentClass';
import Shape from './Shape';
import {transformProps} from '../lib/props';
import {GroupAttributes} from '../lib/attributes';
import extractProps from '../lib/extract/extractProps';
class G extends Component{
class G extends Shape{
static displayName = 'G';
static propTypes = transformProps;
@@ -16,17 +17,11 @@ class G extends Component{
render() {
let {props} = this;
let extractedProps = extractProps(props, {
stroke: true,
fill: true,
transform: true
});
return <RNSVGGroup
{...extractedProps}
{...this.extractProps(props)}
ref={ele => {this.root = ele;}}
>
{this.props.children}
{props.children}
</RNSVGGroup>;
}
}