add ClipPath element support

This commit is contained in:
Horcrux
2016-04-21 17:55:18 +08:00
parent 7859813eac
commit 7d3ef84163
14 changed files with 197 additions and 60 deletions
+4 -5
View File
@@ -13,13 +13,12 @@ class Polyline extends Component{
strokeLinejoin: PropTypes.oneOf(['miter', 'bevel', 'round']),
strokeJoin: PropTypes.oneOf(['miter', 'bevel', 'round'])
};
static getPath = props => (`M${props.points.trim().replace(/\s+/g, 'L')}`);
render() {
let props = this.props;
let d = 'M' + props.points.trim().replace(/\s+/g, 'L');
return <Path
{...props}
points={null}
d={d}
{...this.props}
d={Polyline.getPath(this.props)}
/>;
}
}