chessboardjs
chessboardjs copied to clipboard
Bad board sizing for webview (Cocoonjs/Cordava)
I'm testing chessboardjs with cocoonjs and cordova and I identified a problem with the computed size of the board. The thing is, the board depends on the box-sizing
css property, which is not recognized by webview.
My solution to this is taking the border width of the baord into account when computing the board width and removing the box-sizing
css property:
At line 1447: boardEl.css('width', (SQUARE_SIZE*8 + BOARD_BORDER_SIZE*2) + 'px');
If this is a good change, I can make a pull request or ask @karlb to change his (he have an open pull request similar to this).