Check out Makruk (Thai Chess), our featured variant for March, 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

Interactive diagrams. (Updated!) Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote at 10:20 AM UTC in reply to William Wragg from 09:35 AM:

I am not sure anymore why I added that setting of the aspectRatio, but it must have been for a reason. I suppose that it was for handling the case where sizing the browser window would squeeze the board to below its specified size in the horizontal direction. (When a page does not fit vertically browsers solve it just by scrolling.)

The calculated ration doesn't seem to be correct anymore, though, as it doesn't take account of the size of the board rim. But even then, for boards with as many ranks as files the total size should always be a square.

I have no Apple devices, so I never noticed this, and I cannot test it. A large gap suggests that there is horizontal squeezing, so that to preserve the aspect ratio the vertical size of the board is also reduced. But not the size of the surrounding element. Which is strange.

Is this in situations where there is something left or right of the Diagram that would force the height of the space the Diagram is in to remain large? In that case it seems unavoidable that there is a gap somewhere. Putting a valign="top" in the surrounding element would prevent space to appear above the Diagram, making the gap below it larger. But the surrounding HTML elements are not controlled by the Diagram script; these are part of the HTML page the Diagram is on.