If you write your callback in Jmol script and call it directly from the
hover using a Jmol function. Perhaps?

n Fri, Jul 23, 2010 at 9:18 AM, Paul Pillot <paul.pil...@ac-orleans-tours.fr
> wrote:

> (2nd version of this message, the previous one did not make its way to the
> list yet)
> I am currently working on a viewer that embeds a sequence display with
> mouseover capability : when the user hovers a residue in the sequence, a
> command is sent to Jmol so that the corresponding residue is highlighted.
> This is (very) cool and works well in Safari, at least on my computer.
> When I tried it with firefox I ran in exactly the same problem as described
> by Philip Bays recently. I tried the workaround given by Angel taken from
> the wiki there :
> 3.2 Activating 
> UseCommandThread<http://wiki.jmol.org/index.php/Jmol_Applet_Deployment_Local#Activating_UseCommandThread>
> It worked... that is to say the files could be loaded in the applet. But
> the sequence widget became sluggish : the highlighting in Jmol took a while
> to appear, after the residue had been hovered in the sequence...
>
> I wrote a small test to see if the setcallback was in cause in the drop of
> performance :
> a javascript for loop calls 20 times in a row the jmolscript method. The
> time for the end of each script is reported to the console with the print
> @{now()} command (apparently not documented, but found on the new.htm page).
> When useCommandThread is not set, there is a lapse of 4ms between each
> script with safari (100ms with firefox)
> When it is set, the lapse is of 200 - 250 ms (firefox being a bit slower
> than safari on my laptop) which explains why my page became suddenly slow.
>
> I put the page online if somebody wants to check :
> http://librairiedemolecules.education.fr/outils/test/test.htm
>
> Is there, by any chance, a way to disable that setting once the model is
> loaded, and to re-enable it later, when a new model is going to be loaded ?
>
>
>
>  -Paul
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to