Hello,
I am making a webpage in which the molecule has some 10 sites (defined
as site1, site2 ... upon loading the applet ), and the user can select
which site(s) he wants to view (the halos get turned on and an
isosurface gets generated).  When the mouse hovers over a site that
has been selected, I want a specific hover message to appear.
Additionally, some atoms may belong to more than one site.  In this
case, the hover message must append additional information.

Here is one attempt at this.  This code is within my custom hover
function called by the set hovercallback:
              if(myListL.options[1].selected == true){jmolScript(
                        'if ({atomIndex=_atomHovered}&{site1}); ' +
                                'hover "default1"; select site1; halos 
25%;color halos red; select all;' +
                        'else if ({atomIndex=_atomHovered}&!{site1}); ' +
                                'hover %U; select site1; halos off;' +          
                        'end if; ',"Leftapplet")}

This says that if the first site is selected and the first site is
being hovered, there is the custom message, if it's anything But
site1, then hover is normal.  This does not solve the problem! For
several reasons.  What I need to do is include a some kind of
jmolScript that will Return a boolean if the atom hovered is part of
site1, site2.. (as in, a jmol  script that will evaluate
({atomIndex=_atomHovered}&{site1}) )  OR some kind of jmol script that
will return the sites that the atom hovered belongs to  OR maybe a way
to insert variables into the jmolScript that have been defined in the
previous javascript. OR any other suggestion you may have!

Thank you kindly for your help!
Aya

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to