chessboardjs
chessboardjs copied to clipboard
board.resize only works when width changes
board.resize only works when width changes, but when the height of the browser window changes the chess board is not resized. Is there a way to achieve this?
maybe you can call board.resize() manually when windows's size changed
it does resize on every window resize - but its calculations are based solely on width. You have to make it check for height in calculateSquareSize()
So where it says:
var containerWidth = parseInt(elWidth, 10);
You have to do something like
var containerHeight = parseInt(elHeight, 10);
containerWidth = Math.min(containerWidth,containerHeight);