take a look at http://chemapps.stolaf.edu/jmol/docs/examples-12/sync2i.htm

On Fri, Oct 26, 2012 at 11:14 AM, Carl R LeBlond <[email protected]> wrote:

> 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
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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

Reply via email to