Forgive me if I have already asked for this.
save view [unique_name]
restore view [unique_name]
or, perhaps better:
set defaultview CURRENTVIEW
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)
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
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.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