This commit is contained in:
casperlamboo 2017-11-14 14:58:26 +01:00
parent 4b08f1fbbe
commit ed5c3979d3

View File

@ -7,6 +7,7 @@ import createSceneData from '../d3/createSceneData.js';
import createScene from '../d3/createScene.js';
import injectSheet from 'react-jss';
import ReactResizeDetector from 'react-resize-detector';
import requestAnimationFrame from 'raf';
const styles = {
container: {
@ -62,7 +63,7 @@ class DoodlePreview extends React.Component {
}
onResize = (width, height) => {
window.requestAnimationFrame(() => {
requestAnimationFrame(() => {
const { setSize, render } = this.state;
const { pixelRatio } = this.props;
setSize(width, height, pixelRatio);