Hi,
thanks!
by the way, were can I find the parameter list for all callbacks? were in the
jmol code are they defined?
alex
- Ursprüngliche Mail -
Von: Robert Hanson hans...@stolaf.edu
An: jmol-users@lists.sourceforge.net
Gesendet: Dienstag, 13. Juli 2010 07:27:58
Betreff: Re:
El 13 Jul 2010 a las 11:57, Alexander Rose escribió:
by the way, were can I find the parameter list for all callbacks? were in the
jmol code are they defined?
Alex, I'm trying to document those in
http://jmol.sourceforge.net/jslibrary/#jmolSetCallback
but I'm doing mostly by trial. If you
Hi,
I would like to get the file id/number (that is file from the file.model
notation, e.g. file1.model1) of a model just loaded into an Jmol applet. I
hoped 'set LoadStructCallback someJsFunction' would rescue me, but
LoadStructCallback gives only the params 'appletName, fullPathName,
Alex, if you have just loaded the file, you should be able to use
something like the last frame number, wouldn't you?
http://chemapps.stolaf.edu/jmol/docs/#jmolmath
_lastFrame
_modelNumber
--
This SF.net email is
yes -- Angel has it. The variable is _modelNumber.
In JavaScript:
var currentModel = + jmolEvaluate(_modelNumber)
should do it. This should be a string, not a number, since 3.10 is
different from 3.1. Remember, though, that multiple models can be loaded
when a file is loaded. I think that's
Hi,
thanks Angel, Bob.
I tried it, but (not a show stopper) it only works when I do a setTimeout(...),
e.g.
function myLoadStructCallback(...){
console.log( jmolEvaluate(_modelNumber), jmolEvaluate(_lastFrame) ); //
prints the frame id shown before the load
setTimeout( function(){
Similar finding here.
This is my impressions:
loadStructCallback
Called: upon successful file loading.
but... not before the model has finished loading, so its info is not ready yet
Do you need to use it in loadStructCallback? Because if I do it in the script
line that loads the
file, it
7 matches
Mail list logo