From b2574cc9d406c22b1780480dd627a9867c5a090d Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sat, 26 Feb 2022 16:55:37 -0800 Subject: [PATCH] Screen sizes now work on Android browser Signed-off-by: James Ketrenos --- client/src/Table.css | 4 +++- client/src/Table.js | 2 +- client/src/Trade.js | 2 +- client/src/index.css | 12 +++++++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/client/src/Table.css b/client/src/Table.css index 96bc092..f03b64c 100755 --- a/client/src/Table.css +++ b/client/src/Table.css @@ -1,8 +1,10 @@ .Table { display: flex; position: absolute; + align-self: stretch; width: 100%; - height: 100%; + height: 100vh; + min-height: 100%; justify-content: space-between; /* left-justify 'board', right-justify 'game' */ background-image: url("./assets/tabletop.png"); } diff --git a/client/src/Table.js b/client/src/Table.js index 57c9aa1..fa37eda 100755 --- a/client/src/Table.js +++ b/client/src/Table.js @@ -826,7 +826,7 @@ class Table extends React.Component { updateGame(game) { if (this.state.signature !== game.signature) { - game.signature = game.signature; + this.setState( { signature: game.signature }); } // console.log("Update Game", game); this.setState( { game: game }); diff --git a/client/src/Trade.js b/client/src/Trade.js index 252761c..44e303f 100644 --- a/client/src/Trade.js +++ b/client/src/Trade.js @@ -115,7 +115,7 @@ const Trade = ({table}) => { tmp[get.type] = get.count; }); setGets(tmp); - }, [giveCount, getCount, setGives, setGets]); + }, [giveCount, getCount, setGives, setGets, table]); if (!table.game) { return (<>); diff --git a/client/src/index.css b/client/src/index.css index aa3cb9a..13d0096 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -4,8 +4,18 @@ } } -body { +html { + height: 100%; + width: 100%; margin: 0; + padding: 0; +} + +body { + height: 100%; + width: 100%; + margin: 0; + padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;