shaack / cm-chessboard

A JavaScript chessboard without dependencies. Rendered in SVG, coded in ES6. Views FEN, handles move input, animated, responsive, expandable
MIT License
209 stars 63 forks source link

Error on rendering the board #125

Closed alfreale closed 11 months ago

alfreale commented 11 months ago

I have updated the last version and I got this error:

ChessboardView.js:263 Uncaught TypeError: Failed to execute 'setTranslate' on 'SVGTransform': The provided float value is non-finite. at ChessboardView.drawPieceOnSquare (ChessboardView.js:263:19) at ChessboardView.redrawPieces (ChessboardView.js:230:22) at ChessboardView.handleResize (ChessboardView.js:128:18) at ResizeObserver. (ChessboardView.js:26:26)

I got this error only in Windows 10 and google chrome 115. Using Linux it works. It seems a bit strange that I got this error only on Windows, but this error appears only after the update.

shaack commented 11 months ago

Can you provide an online version of your implementation so I can check whats happening?

alfreale commented 11 months ago

Hi, It was my fault. I passed a wrong aspect ratio to the chessboard.

shaack commented 11 months ago

Okay, no problem :)