💡📝H. G. Muller wrote on Mon, Dec 12, 2022 07:27 PM UTC:
I don't completely grasp the ramifications of all this yet. But a point of concern could be this: an Interactive Diagram on a page does not always exert its effect only within the elements of class="idiagram", but can have 'satellites' embedded in the text elsewhere on the page. E.g. for creating a clickable list of the pieces as an UL or P element, creating the piece table (that you can normally open under the diagram) in another place so that it is in permanent view (for when the variant involves drops or setting up an initial position), or a table with verbal descriptions of the piece moves.
In the Diagrams I inserted in articles I often used a two-cell table, with the Diagram itself in the left cell, and the clickable list of pieces in the right cell. When JavaScript is off, I wanted that entire table to disappear. I did this by starting the table in the display:none style, and including a script on the page that called the OpenDiv() function in the betza.js file to make it visible. But that table did not have the idiagram class. So it might be difficult to automatically decide what should be hidden in print mode. We might have to explicitly go through all pages with Interactive Diagrams to surround the parts we want to disappear with class="noprint" DIV tags.
I don't completely grasp the ramifications of all this yet. But a point of concern could be this: an Interactive Diagram on a page does not always exert its effect only within the elements of class="idiagram", but can have 'satellites' embedded in the text elsewhere on the page. E.g. for creating a clickable list of the pieces as an UL or P element, creating the piece table (that you can normally open under the diagram) in another place so that it is in permanent view (for when the variant involves drops or setting up an initial position), or a table with verbal descriptions of the piece moves.
In the Diagrams I inserted in articles I often used a two-cell table, with the Diagram itself in the left cell, and the clickable list of pieces in the right cell. When JavaScript is off, I wanted that entire table to disappear. I did this by starting the table in the display:none style, and including a script on the page that called the OpenDiv() function in the betza.js file to make it visible. But that table did not have the idiagram class. So it might be difficult to automatically decide what should be hidden in print mode. We might have to explicitly go through all pages with Interactive Diagrams to surround the parts we want to disappear with class="noprint" DIV tags.