💡📝H. G. Muller wrote on Mon, May 8, 2023 09:02 AM EDT:
I made some enhancements to the Diagram script, directed at better servicing the Ultima page:
* A custom initialization script can now be provided, by defining a function with the name given by the satellite parameter suffixed with 'Init'. It will be called immediately after the definition of the Diagram has been processed. This can be useful for adding dedicated initialization code that must be exectuted only after the normal creation of the Diagram, (static embedded code would be executed before that), or for properly associating initialization code with the Diagram it belongs with when there are multiple Diagrams on the same page (each with their own value for satellite).
On the Ultima page I now embedded a function ultimaInit(), which does what before was done by pressing the 'Change' button to toggle between trampler and burner mode for entering the moves, so that that button could be removed. (And all pieces are now always treated as burners, meaning the side effects are implied by the click on the destination.)
* The highlighting of burner moves now uses the (red) capture highlight to indicate empty destinations that would result in a capture elsewhere as automatic side effect.
I made some enhancements to the Diagram script, directed at better servicing the Ultima page:
* A custom initialization script can now be provided, by defining a function with the name given by the satellite parameter suffixed with 'Init'. It will be called immediately after the definition of the Diagram has been processed. This can be useful for adding dedicated initialization code that must be exectuted only after the normal creation of the Diagram, (static embedded code would be executed before that), or for properly associating initialization code with the Diagram it belongs with when there are multiple Diagrams on the same page (each with their own value for satellite).
On the Ultima page I now embedded a function ultimaInit(), which does what before was done by pressing the 'Change' button to toggle between trampler and burner mode for entering the moves, so that that button could be removed. (And all pieces are now always treated as burners, meaning the side effects are implied by the click on the destination.)
* The highlighting of burner moves now uses the (red) capture highlight to indicate empty destinations that would result in a capture elsewhere as automatic side effect.