mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-01 22:25:12 +00:00
add touchable support for shape elements
This commit is contained in:
@@ -4,11 +4,9 @@ import createNativeComponent from '../lib/createNativeComponent';
|
||||
import mergeContext from '../lib/mergeContext';
|
||||
import {circleProps, pathProps, fillProps, strokeProps, numberProp} from '../lib/props';
|
||||
|
||||
class Circle extends Component{
|
||||
static displayName = 'Circle';
|
||||
static propTypes = {
|
||||
...pathProps,
|
||||
...circleProps
|
||||
};
|
||||
|
||||
static contextTypes = {
|
||||
@@ -19,28 +17,12 @@ class Circle extends Component{
|
||||
svgId: numberProp
|
||||
};
|
||||
|
||||
//constructor() {
|
||||
// super(...arguments);
|
||||
// _.forEach(SvgTouchableMixin, (method, key) => {
|
||||
// this[key] = method.bind(this);
|
||||
// });
|
||||
//
|
||||
// this.state = this.touchableGetInitialState();
|
||||
//};
|
||||
|
||||
render() {
|
||||
let props = mergeContext(this.props, this.context);
|
||||
return <RNSVGCircle
|
||||
{...extractProps(props)}
|
||||
cx={props.cx.toString()}
|
||||
cy={props.cy.toString()}
|
||||
r={props.r.toString()}
|
||||
//onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
|
||||
//onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest}
|
||||
//onResponderGrant={this.touchableHandleResponderGrant}
|
||||
//onResponderMove={this.touchableHandleResponderMove}
|
||||
//onResponderRelease={this.touchableHandleResponderRelease}
|
||||
//onResponderTerminate={this.touchableHandleResponderTerminate}
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user