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