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

Enter Your Reply

The Comment You're Replying To
H. G. Muller wrote on Wed, Jun 4 09:40 AM UTC in reply to Fergus Duniho from Tue Jun 3 05:50 PM:

OK, it is great that we identified the cause. Apparently iPad has some sick behavior in enforcing the aspect ratio of the <table>. Which might conflict with setting the height of individual board squares in Display() using clientWidth.

I added both those lines to handle the case of horizontal squeezing better; otherwise this would make the cells less wide and the images smaller, but leave the height of the cells as specified. The fact that I added a second line where a single one should have sufficed already suggest this was not really working as it should.

Using the CSS calculation of square size based on available width could be an alternative to prevent uncontrollable compression of the board width.

Some of the modifications you made in betzaFlex.js serve another purpose, though, namely positioning of the (collapsed) piece table.

I guess we have to rethink how we typically want to insert the Diagram and its satellites on a page, and how much of that we want to automate through parameters in the Diagram definition, as opposed to surrounding HTML. The piece table originally was a pure 'satellite' to the Diagram; it would only appear when there was a <table id="pieceTable"> on the page, in the location where the user had written that. Similar to the piece list, which summarizes the pieces in a more compact form. Later I created the required <table> automatically (initially hidden) under the Diagram when no such <table> element was yet on the page.

When upgrading articles with Interactive Diagrams I now almost always use a surrounding 2x1 table, where the board goes in the left column, and a piece list goes in the right column. Like:

<div id="maind" style="display:none">
  <table><tr>
<td width="500">
  <div class="idiagram">
    satellite=main
    ...
  </div>
</td>
<td valign="top">
  <p style="height:40px"></p>
  <ul id="mainList">
  </ul>
</td>
</tr></table>
</div>

Having a list of clickable piece names to the right of the Diagram is very convenient on a monitor, where there is room for even a long list in a large variant, so board and list are visible simultaneously. On a phone it might not be so good though, and I have not made any provisions for that.

This whole construction could of course also be generated within the <div> with id="idiagram", when a new parameter ordered it to do so. And the <table> could be replaced by a flexbox, to adapt to narrow screens. Just like you did in betzaFlex. The only issue is what should be put in the second flexbox item: the piece table, or just a list (as <ul> or <p>). E.g. we could add a parameter flexbox=X, where X could be T, U or P depending on what we want to display next or under the board.


Edit Form

Comment on the page Interactive Diagram

Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Avoid Inflammatory Comments
If you are feeling anger, keep it to yourself until you calm down. Avoid insulting, blaming, or attacking someone you are angry with. Focus criticisms on ideas rather than people, and understand that criticisms of your ideas are not personal attacks and do not justify an inflammatory response.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.