If I'm not wrong, all of them are now using divBoard.classList.add, which makes it end up in a situation where more than one exclusive value is present (more details in the aforementioned pull request), breaking the application.
You'll see I did the trick with a some TypeScript generics, in order to re-use code, but I'd be happy to simplify if by copy-pasting one function for each type. Similar for the enums, and for the heuristics. I'll be happy to apply any code suggestion you have that achieves the same behavior, but that's the best I could do so far.
I hope it helps! At least, it would really unblock the use I'm planning to for this amazing library! 💟
Similar to https://github.com/mliebelt/pgn-viewer/pull/476, but more generically, it fixes the board CSS class manipulation for the following (on top of piece style):
If I'm not wrong, all of them are now using
divBoard.classList.add
, which makes it end up in a situation where more than one exclusive value is present (more details in the aforementioned pull request), breaking the application.You'll see I did the trick with a some TypeScript generics, in order to re-use code, but I'd be happy to simplify if by copy-pasting one function for each type. Similar for the enums, and for the heuristics. I'll be happy to apply any code suggestion you have that achieves the same behavior, but that's the best I could do so far.
I hope it helps! At least, it would really unblock the use I'm planning to for this amazing library! 💟
Thanks!