Patches for getting resizable applet and text panels in Jmol 10.2 and 11.0.x
Rationale:
The automatic resizing of applet is done by a combination of CSS and applet size in percent. This latter was not available in versions of Jmol.js before 11.1.20
Patches:
- Jmol.js included with Jmol package 11.1.20 or later works without any fix.
- Jmol.js included with Jmol package 11.1.1 to 11.1.19: upgrade to latest 11.1.x
- Jmol.js included with Jmol package 11.0.2 works without any fix.
- Jmol.js included with Jmol package 11.0 or 11.0.1 needs this patch: plain text js or zipped js . Recommended option: upgrade to 11.0.2
- Jmol.js included with Jmol package 10.2 needs this patch: plain text js or zipped js
Instructions for installing the patches:
Method: Rather than replacing the original Jmol.js, we will add a second .js file that will overwrite some of the code in the original. In this way, Jmol.js can be updated in the future without the need to edit it again. Once the updated Jmol.js includes the functionality, just remove the call to the second .js file.
Procedure:
- Put the patch file you have downloaded in the same folder as the original Jmol.js file.
- In every html page where Jmol.js is invocated, add a similar call to the patch file.
Example:
if your page used
<head>
<script src="../Jmol.js" type="text/javascript"></script>
</head>
it must be changed into
<head>
<script src="../Jmol.js" type="text/javascript"></script>
<script src="../Jmol_11_resizable.js" type="text/javascript"></script>
</head>