add touchable support for shape elements

This commit is contained in:
Horcrux
2016-06-09 23:30:10 +08:00
parent 16b4f741f5
commit 7307715712
12 changed files with 123 additions and 67 deletions
+4 -4
View File
@@ -1,11 +1,11 @@
import React, {PropTypes, Component} from 'react';
import extractProps from '../lib/extract/extractProps';
import React, {PropTypes} from 'react';
import createNativeComponent from '../lib/createNativeComponent';
import mergeContext from '../lib/mergeContext';
import Shape from './Shape';
import {ellipseProps, pathProps, fillProps, strokeProps, numberProp} from '../lib/props';
class Ellipse extends Component{
class Ellipse extends Shape{
static displayName = 'Ellipse';
static propTypes = {
...pathProps,
@@ -23,7 +23,7 @@ class Ellipse extends Component{
render() {
let props = mergeContext(this.props, this.context);
return <RNSVGEllipse
{...extractProps(props)}
{...this.extractProps(props)}
cx={props.cx.toString()}
cy={props.cy.toString()}
rx={props.rx.toString()}