lichess-org / chessground

Mobile/Web chess UI for lichess.org
https://lichess.org
GNU General Public License v3.0
1.04k stars 261 forks source link

Add option to display coordinate on every square #301

Closed unicolored closed 5 months ago

unicolored commented 5 months ago

Hello!

I'm Gilles. This is my first PR, inspired by an old electronic chess game. Capture d’écran 2024-05-01 à 10 46 15

This enhancement introduces a feature to display coordinates on every square, which can help with visual learning and quicker square identification. Capture d’écran 2024-05-01 à 11 20 22

Key Features:

Demo:

      Chessground(document.getElementById('board-4'), {
        orientation: 'black',
        coordinatesOnSquares: true,
        ranksPosition: 'left'
      });
      Chessground(document.getElementById('board-5'), {
        orientation: 'white',
        coordinatesOnSquares: true
      });

Testing:

I've tested this feature across various board configurations and verified that the coordinates adjust correctly with changes in size, orientation and ranksPosition.

Looking forward yo your feedback 😊

ornicar commented 5 months ago

Nice, thanks!

ornicar commented 5 months ago

9.1.0 published

EvanCarroll commented 3 months ago

I see the option "Coordinates on every square" in the trainer. But I don't have the setting on lichess.com under Preferences -> Display. I would expect to find it here https://lichess.org/account/preferences/display

Can we get this added there too. I'd love to use this to learn the coordinates in live games.