#How can I build a Chess Editor like lichess.com/editor?

3 messages · Page 1 of 1 (latest)

bleak relic
#

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

fading oak
#

This is a very nebulous question.

It would be helpful if you would share what you have tried.

Can I look at your src anywhere?

#

It is impossible to debug with a general description of your code.