Bob,
Yes exactly, I want to show my kids enantiomers. I'm a bit of a hack
and not the greatest at javascript. I played around with some
javascript call back tutorials, then realized I should probably just
do something like this using the syncCallback method, but it was
unsuccesful. I'm tyring to turn sync on and off with checkbox. Its
probably obvious, so thanks for your patience.
function sync() {
var syncing = document.getElementById("drive").checked
if(syncing)
jmolScript('sync * ON; sync * "set syncMouse on;set syncScript on;
set syncCallback mysynccallback"','A')
else
jmolScript('sync * OFF','A')
}
function mysynccallback(app, script) {
if (script.indexOf("Mouse: rotateXYBy") == 0) {
var S = script.split(" ");
S[2] = -parseFloat(S[2]);
S[3] = -parseFloat(S[3]);
script = S.join(" ")
}
return script
}
------------------------------------------------------------------------------
The Windows 8 Center
In partnership with Sourceforge
Your idea - your app - 30 days. Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users