mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-02 06:35:04 +00:00
Fix Polygon and Polyline
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import Path from './Path';
|
||||
import {pathProps} from '../lib/props';
|
||||
import extractPolyPoints from '../lib/extract/extractPolyPoints';
|
||||
|
||||
export default class extends Component{
|
||||
static displayName = 'Polyline';
|
||||
@@ -26,7 +27,7 @@ export default class extends Component{
|
||||
return <Path
|
||||
ref={ele => {this.root = ele;}}
|
||||
{...this.props}
|
||||
d={`M${points.trim().replace(/\s+/g, 'L')}`}
|
||||
d={`M${extractPolyPoints(points)}`}
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user