Removing dead code
This commit is contained in:
parent
b299d32fc3
commit
d4aa207f75
@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
|
|
||||||
import * as style from './style';
|
import * as style from './style';
|
||||||
|
|
||||||
|
const padding = 10;
|
||||||
const namespaceProps = {
|
const namespaceProps = {
|
||||||
'xmlns': 'http://www.w3.org/2000/svg',
|
'xmlns': 'http://www.w3.org/2000/svg',
|
||||||
'xmlns:cc': 'http://creativecommons.org/ns#',
|
'xmlns:cc': 'http://creativecommons.org/ns#',
|
||||||
@ -22,24 +23,13 @@ const metadata = `<rdf:rdf>
|
|||||||
|
|
||||||
class SVG extends React.PureComponent {
|
class SVG extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onReflow: PropTypes.func,
|
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
padding: PropTypes.number,
|
|
||||||
innerWidth: PropTypes.number,
|
innerWidth: PropTypes.number,
|
||||||
innerHeight: PropTypes.number
|
innerHeight: PropTypes.number
|
||||||
}
|
}
|
||||||
|
|
||||||
static defaultProps = {
|
|
||||||
padding: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
state = {
|
|
||||||
width: 0,
|
|
||||||
height: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { padding, innerWidth, innerHeight, children } = this.props;
|
const { innerWidth, innerHeight, children } = this.props;
|
||||||
|
|
||||||
const width = Math.round(innerWidth + 2 * padding);
|
const width = Math.round(innerWidth + 2 * padding);
|
||||||
const height = Math.round(innerHeight + 2 * padding);
|
const height = Math.round(innerHeight + 2 * padding);
|
||||||
|
@ -7,7 +7,6 @@ class Text extends React.PureComponent {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
quoted: PropTypes.bool,
|
quoted: PropTypes.bool,
|
||||||
transform: PropTypes.string,
|
transform: PropTypes.string,
|
||||||
onReflow: PropTypes.func,
|
|
||||||
children: PropTypes.oneOfType([
|
children: PropTypes.oneOfType([
|
||||||
PropTypes.arrayOf(PropTypes.node),
|
PropTypes.arrayOf(PropTypes.node),
|
||||||
PropTypes.node
|
PropTypes.node
|
||||||
|
Loading…
Reference in New Issue
Block a user