From ca1e2af6cbebef470613c40d24ffe8080f1833e1 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Mon, 28 Feb 2022 00:01:05 -0800 Subject: [PATCH] Remove updateDimensions Signed-off-by: James Ketrenos --- client/src/Table.js | 32 -------------------------------- 1 file changed, 32 deletions(-) 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() {