优化 Symbol

优化 Symbol
This commit is contained in:
Horcrux
2016-01-25 18:38:35 +08:00
parent 50b941c4bc
commit 2cd7290808
4 changed files with 17 additions and 31 deletions

View File

@@ -13,10 +13,10 @@ import extractViewbox from '../lib/extractViewbox';
class ViewBox extends Component{
static displayName = 'ViewBox';
static propType = {
transform: PropTypes.bool
shouldTransform: PropTypes.bool
};
static defaultProps = {
transform: false
shouldTransform: false
};
render() {
@@ -32,12 +32,14 @@ class ViewBox extends Component{
y = viewbox.y;
}
return <G
{...this.props}
x={x}
y={y}
scaleX={scaleX}
scaleY={scaleY}
id={this.props.id}
svgId={this.props.svgId}
preserveAspectRatio={null}
viewbox={null}
preserveAspectRatio={null}
>
{(!scaleX || !scaleY) ? null : this.props.children}
</G>