diff --git a/client/src/Table.js b/client/src/Table.js index cb50354..14c1392 100755 --- a/client/src/Table.js +++ b/client/src/Table.js @@ -529,7 +529,6 @@ class Table extends React.Component { loading: 0 }; this.componentDidMount = this.componentDidMount.bind(this); - this.updateDimensions = this.updateDimensions.bind(this); this.throwDice = this.throwDice.bind(this); this.resetGameLoad = this.resetGameLoad.bind(this); this.loadGame = this.loadGame.bind(this); @@ -803,35 +802,6 @@ class Table extends React.Component { throwDice() { return this.rollDice(); } - - updateDimensions() { - const hasToolbar = false; - - if (this.updateSizeTimer) { - clearTimeout(this.updateSizeTimer); - } - - this.updateSizeTimer = setTimeout(() => { - const container = document.getElementById("root"), - offset = hasToolbar - ? container.firstChild.offsetHeight - : 0, - height = window.innerHeight - offset; - - this.offsetY = offset; - this.width = window.innerWidth; - this.height = height; - - if (this.cards && this.cards.style) { - this.cards.style.top = `${offset}px`; - this.cards.style.width = `${this.width}px`; - this.cards.style.height = `${this.heigh}tpx`; - } - - this.updateSizeTimer = 0; - }, 250); - } - updateGame(game) { if (this.state.signature !== game.signature) { @@ -1014,8 +984,6 @@ class Table extends React.Component { this.setState({ loading: this.state.loading - 1 }); this.resetGameLoad(); }); - - setTimeout(this.updateDimensions, 1000); } componentWillUnmount() {