So I am currently trying to make a editor like the lichess editor.
I have encountered a problem with listening to clicking events, sometimes it doesnt recognize the clicking on a square. This is the case on the mobile and leads to some squares being not detected. Is there any way to get a square directly after a click event?
What I am currently doing:
- Get the Bounding box of the chess board and calculate the square based off that
- Place the selected piece on the chessboard (changig the fen)
- I sync chess.js and the chessground fen, so i make most things on chess.js and then just sync the FEN to Chessground
pls help...
thanks