THeK3nger/obsidian-chessboard

feature: board orientation

Closed this issue ยท 4 comments

Hello, and thanks for your work on the plugin! It's super useful.

I had a feature suggestion: would it be possible to customize the board orientation, to view it from the black player point of view? Typically when taking notes about a defense for black pieces, it would make much more sense. It could be by adding an option such as orientation: white|black for instance, or something in these lines.

Is this already on the addon roadmap? And do you think this would be feasible?

Hi! I agree. It is an important feature. It should not be hard to implement so I'll start working on it.

Hi! I agree. It is an important feature. It should not be hard to implement so I'll start working on it.

That's super cool! I looked into the code, but it seemed less easy than I initially thought (since on top of interpreting the FEN, it must also correctly handle annotations with the board reversed and generally speaking, correctly map the coordinates to the correct location in the output image). Maybe because I'm not familiar with the codebase :)

Yes ๐Ÿ˜… It is not the prettiest of the code. It was just a test to experiment with the early Obsidian API. At some point, I need to refactor things. :P

Anyway, I've just released 0.5.0 with this feature. Add orientation: black to the code to rotate the board (white is the default, of course).

Just tried and it works well! I'll experiment in my notes to replace old board screenshots, will play with annotations and all that too, and I'll let you know if I notice some weird stuff.

Thanks for being so diligent about this!