use raf to render

This commit is contained in:
casperlamboo 2017-12-05 14:07:11 +01:00
parent c36e36540d
commit 595327da17

View File

@ -218,7 +218,7 @@ class D3Panel extends React.Component {
render() { render() {
const { state, classes } = this.props; const { state, classes } = this.props;
this.update(state); this.update(state);
this.renderScene(); rafOnce(this.renderScene);
return ( return (
<div className={classes.container}> <div className={classes.container}>
<ReactResizeDetector handleWidth handleHeight onResize={this.resizeHandler} /> <ReactResizeDetector handleWidth handleHeight onResize={this.resizeHandler} />