Remove updateDimensions
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
99ae8c5c81
commit
ca1e2af6cb
@ -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);
|
||||
@ -804,35 +803,6 @@ class Table extends React.Component {
|
||||
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) {
|
||||
this.setState( { 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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user