AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Jmol reappear after hiding12/29/2023 Of the two, loading the machine takes much longer. One is to load the java machine, the other is to load the applet. While interesting in concept, the execution of this task is not trivial because Oracle (formerly Sun) leaves it to each browser to create the Jave plugin for their own browser so how they behave varies from browser to browser and is annoyingly inconsistant. For example, if the user needs to log in or needs to search a catalog of molecules prior to displaying one, the time required for those processes can be used to preload Java and the applet(s) so that when it comes time to display the molecule, it looks instantanious. In certain web page designs, it is possible to preload Java and the applet(s) while the user takes care of other housekeeping functions so that when they are needed, they are present and there is no need for the user to be advised of the delay. The long time it takes for Java and Jmol to load leads to a the need to let users know what is going on as described in the section above. How to preload Java and the Jmol Applet in background Therefore, it is important that if you put a "please wait" message using echo, you follow it with a refresh command that way, the message will be shown and stay there until Jmol finishes its task (often, you will need to remove the message then). loading a file or calculating an isosurface), the display is not updated. Įcho Molecule loaded||Click here to turn off this warning|and then use the available controls|to select parts of the molecule|and change its visualization Įcho Use the available controls|to select a molecule|and change its visualization JmolApplet("100%", "script pre.txt load file.pdb script post.txt")Įcho Molecule loading||It will take a few seconds,|depending on molecule complexity|and your connection speed||Please wait. While the model is loading (after Jmol has finished loading) Trick #1 JmolApplet(, 'set disablePopupMenu on set frank off set echo middle center font echo 19 sans color echo echo Jmol is ready ') The Java and Jmol logos will show up temporarily, but that is not a bad thing, as it proves that something is indeed going on.īorder:1px inset #333333 padding:4px margin-right:2ex įont-family:Arial, Helvetica, sans-serif text-align:center I use matching colors for the DIV and applet backgrounds and texts, so the applet is not too apparent as such. I insert a small DIV with a "please wait" warning and the applet this latter does not load any molecule, just displays a "done" message using the echo command. Here I choose to put a small JmolApplet in the homepage (here flushed top left, but could go anywhere else), so while the user reads the introduction to the site, Java and Jmol can go on loading, and when the user jumps to the content pages, Jmol will be cached and load quickly with the contents. This is not easy, as you cannot put anything in the place of the applet the browser draws the applet (even before it is loaded) on top of anything else in the page. Note: the 'jmolBox' name can be changed to anything you wish. in your page's JavaScript, before you call Jmol.getApplet():.You need an image like this, and two lines of code: This is a clean, simple method that displays an animated image (spinner) until the Jmol object Please, feel free to share here your tricks for showing a "please, wait" kind of notice so that users get some feedback that the JmolApplet is loading. How to provide a 'please wait' notice while the Jmol Object is loading 2.3 Using absolute positioning to keep the applet out of view during the preload.2.2 Using Z-Index to hide the applet behind other content during the preload.2.1 Using display: none and visibility: hidden to hide applet during the preload.2 How to preload Java and the Jmol Applet in background. ![]() 1.3 While the model is loading (after Jmol has finished loading).1 How to provide a 'please wait' notice while the Jmol Object is loading.
0 Comments
Read More
Leave a Reply. |