commit
ad7abe557d
|
@ -30,7 +30,9 @@ class Clock extends React.Component {
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
window.addEventListener('resize', this.handleCalculateShape);
|
window.addEventListener('resize', this.handleCalculateShape);
|
||||||
|
setTimeout(() => {
|
||||||
this.handleCalculateShape();
|
this.handleCalculateShape();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
|
|
|
@ -27,7 +27,9 @@ class Hand extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
|
setTimeout(() => {
|
||||||
this.setState({knobWidth: this.refs.knob.offsetWidth});
|
this.setState({knobWidth: this.refs.knob.offsetWidth});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount () {
|
componentWillUnmount () {
|
||||||
|
|
Loading…
Reference in New Issue