On Fri, Aug 14, 2015 at 11:52 AM, <tremato...@gmail.com> wrote:

> Hello guys
>
> For jsmol I would like to know if is possible to style the hover label
> changing more than the font, color and background. For now I need to have
> rounded borders and remove the outer square border. Can I style it using
> css or something similar?
>
>
Perhaps. What you can do is

hover off
set hovercallback "xxxxx"

where xxxxx is a JavaScript function on your page.  Your function will be
called even though  hover is off. Then you can do whatever you want with
that, putting up whatever label or message you like.

function xxxxx(sJmol, strHover, iAtom) {

}

The first parameter will be null, I think. Note that Jmol can tell you the
x,y coordinates of the atom using

  jmolApplet0.viewer



> Also, sometimes the label shows under the mouse pointer not above it.
> I would like to try two things to check which one is better:
> - positioning based on mouse coordinates to have the label always at same
> distance from the mouse (like centered 5 pixels above the mouse)
> - keep the labels positioned someplace on the screen, like always top
> center
> Is that possible?
>
>
> * off topic: Can I use jsmol on http://fiddle.jshell.net/ ? I tried but
> the model didn't load.
>
> Thanks! Have a great day
> Fausto
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to