- const movesWidth = 280; //TODO: constant somewhere...;
- const minBoardWidth = 240; //TODO: same
- // Value of 0 is board min size; 100 is screen.width - movesWidth
- const boardSize = k * (screen.width - (movesWidth+minBoardWidth)) / 100 + minBoardWidth;
+ const movesWidth = (window.innerWidth >= 768 ? 280 : 0);
+ const minBoardWidth = 240; //TODO: these 240 and 280 are arbitrary...
+ // Value of 0 is board min size; 100 is window.width [- movesWidth]
+ const boardSize = minBoardWidth +
+ k * (window.innerWidth - (movesWidth+minBoardWidth)) / 100;