Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh960 game piece icons in the hand disappear after flip board command #1419

Closed
gbtami opened this issue Apr 28, 2024 · 2 comments
Closed

zh960 game piece icons in the hand disappear after flip board command #1419

gbtami opened this issue Apr 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@gbtami
Copy link
Owner

gbtami commented Apr 28, 2024

pkr5025 reported on Discord:
pretty minor issue, but when spectating zh960 on firefox, when I hit 'f' and flip the board, the piece icons in the hand disappear.
Before

After

refreshing brings the piece icons back, but also resets the board orientation

@gbtami gbtami added the bug Something isn't working label Apr 28, 2024
@randompearl-stack
Copy link
Contributor

return h('div.pocket.' + position + '.editor.usable', {
style: {
'--pocketLength': String(width),
'--editorLength': String(roles.length),
'--piecerows': String(Math.ceil(roles.length / width)),
'--files': String(width),
'--ranks': String(height),
},

pocket.style.setProperty('--piecerows', `${pieceRows}`);

Not sure where exactly it is controlled but when the board is flipped the --piecerows: 1 inline style disappears. Also, the issue affects all variants with pockets.

@gbtami
Copy link
Owner Author

gbtami commented Jun 17, 2024

Thx for the pointer! It helped a lot.

@gbtami gbtami closed this as completed in 76fecbb Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants