Hi Jmol users and developers,
I ran into an interesting problem when I am trying to update the current info 
about the boundbox using the getProperty() function. What happened was that 
getProperty() seems to return the value before the applet finishes setting up. 
I am showing a simplified snippet of my code below to better illustrate:
---
document.getElementById("applet").script("center all; set boundbox{all} on;");
//alert("delay"); 
var box = document.getElementById("applet").getPropertyAsJSON("boundInfo");
alert(box);
---

Now, with the alert("delay") commented out, my alert(box) line returns the 
default values having boundbox center being 0,0,0 and vector being 10,10,10. 
However, with the alert("delay") line in, the alert(box) line returns the 
different values that reflects the real center which depends on what molecules 
are loaded.

So, it appears that the getProperty() function and the applet.script(...) are 
out of sync. Any suggestions?

-Rob
_________________________________________________________________
If you like crossword puzzles, then you'll love Flexicon, a game which combines 
four overlapping crossword puzzles into one!
http://g.msn.ca/ca55/208
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to