Forgive me if I have already asked for this. save view [unique_name]
load "some_file_name" or .loadInline("some data") restore view [unique_name] or, perhaps better: set defaultview CURRENTVIEW load "some_file_name" or .loadInline("some data") The idea is a capture of the current zoom, rotation, and translation so that it's easy to load a new model (for example a different vibration) or change a model (rearrange bonding is what I'm thinking, for example) without changing the orientation. I know I can do this with JavaScript and message callbacks, but that is really a tricky deal and not something that is accessible to jmol.js users. I suppose a compromise, if it can't be done in the applet would be to create a JavaScript function in jmol.js: loadPreserve(filename) or loadInlinePreserve(moldata) that a) saves the filename or moldata as a global b) does the "show orientation" asyncronously c) loads the file or data asyncronously d) restores the saved orientation with message callback traps of each step. But it sure would be easier to say: jmol.script('save view CURVIEW;load "myfile.mol";restore view CURVIEW') or, even better would be the following, where "defaultview" is a special term that runs when data or file are loaded. This would make loadInline() considerably easier, with no callbacks. jmol.script('set defaultview CURRENTVIEW;load "myfile.mol"') jmol.script('set defaultview CURRENTVIEW') jmol.loadInline(moldata) jmol.script('set defaultview') //returns 0,0,0 view I'm not saying I have the exact idea here. Maybe there's a cleaner way. Maybe I want "set" or "define" there instead of "save", I don't know. But something like this would make the dynamic aspects of jmol that much more usable. Bob Hanson ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers