Check out McCooey's Hexagonal Chess, our featured variant for May, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Fischer Random Chess. Play from a random setup. (8x8, Cells: 64) (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote at 01:27 AM UTC in reply to H. G. Muller from Wed May 14 08:24 PM:

I searched for style.height in the script, and it turned out that there is an assignment cellp.style.height = cellp.clientWidth to all board squares in Display().

That's a bit of your code that I overlooked, because I didn't know what it was doing.

I think this was an attempt to force the squares to remain square when the browser window starts to compress the Diagram in the horizontal direction.

What I'm doing by taking the minimum of three values is handling the same problem. When the default size is too large for the screen, it finds the largest size that will comfortably fit the available space and uses it for both height and width.

But it appears the way you handle the square sizes causes the clientWidth to become 0px, while the assignment erases your setting of the height in vh units.

After commenting out this assignment from betzaFlex.js the Diagram now also shows up when the coordinates are not displayed.

Since what I'm doing handles the same problem, it looks like this clientWidth assignment is no longer even needed, and commenting it out was the right thing to do.