diff --git a/src/components/Goban.js b/src/components/Goban.js index 359fea21..eca1c3d6 100644 --- a/src/components/Goban.js +++ b/src/components/Goban.js @@ -71,7 +71,7 @@ export default class Goban extends Component { let {maxWidth, maxHeight} = this.state setTimeout(() => { - let {offsetWidth: width, offsetHeight: height} = this.element + let {width, height} = this.element.getBoundingClientRect() let left = Math.round((maxWidth - width) / 2) let top = Math.round((maxHeight - height) / 2)