From: Bob H. <ha...@st...> - 2007-08-08 20:41:33
|
Timothy Driscoll wrote: >On Aug 7, 2007, at 11:32 PM, Bob Hanson wrote: > > > >>11.3.9 is ready for release and can be experimented with at >> >>http://chemapps.stolaf.edu/jmol/docs/examples-11 >> >>new "synchronize" command >>------------------------- >> >>An idea that has been bouncing around for way too long is a good >>way to >>get a Jmol applet to synchronize with another -- so that when you >>rotate >>one, the other rotates as well. Happy to say this is now possible. It >>turned out way more complex than I had hoped, but I think the end >>result >>is going to be a hit -- provided it works on Macs. We'll see. Please >>test this. You can check it out at >>http://chemapps.stolaf.edu/jmol/docs/examples-11/sync2.htm. >> >> >> > >hey Bob, > >very cool! I don't have time to test all of the features, but it >works ok for me in Safari 2.0.4 (no crashing, desired behavior). > > That is a relief. Any others with this observation -- that it works OK on a Mac? >the only glitch I have found so far is that 'spin' turns on spinning >in both applets, but the right-hand applet quickly falls out of synch >with the left (within 15-20 seconds or so). issuing a 'spin off' >stops the left side, but does *not* stop the right side until the >orientations are again in synch. > > >tim > > Ah, yes. That's because the moveTo commands are being queued every 100 ms, each with a 100 ms time-frame, and they are queued, so the following applet can get behind. I've added a ! ahead of the moveto command. What this does is replace any pending moveTo with a new one. I think that's the proper behavior, anyway. In this way you shouldn't be able to get more than 100 ms behind at any time. -- Robert M. Hanson Professor of Chemistry 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 |