It seems it is better to give your hover callbacks new IDs:

function hoverAction(action) {
*   timeout off;*
   print "action=" + action + "  _atomhovered=" + _atomhovered;
   if (action == "start") {



*     set hoverlabel @{"hover " + now()}     timeout ID @{"hoverEnd"+
now()} 2.0 "hoverAction('end')";*
   } else {
     set hoverlabel ""
   }
}
set hoverCallback "jmolscript: hoverAction('start');";



On Fri, Nov 21, 2014 at 10:33 AM, Rolf Huehne <[email protected]>
wrote:

> On 11/21/2014 05:14 PM, Robert Hanson wrote:
> > try adding the (required) ID keyword:
> >
> > timeout ID "hoverEnd" OFF
> >
> The documentation states that the 'ID' keyword is optional.
> Anyway, it doesn't make a difference.
>
> I have made a minimalistic version of the system and it shows the same
> behaviour (see code and results below). The 'start/end' cycle ends
> immediately after the mouse is removed from the atom. So there seem to
> be no pending "hoverAction('end')" calls.
>
> --- Code -----------------
> function hoverAction(action) {
>    timeout ID "hoverEnd" off;
>    print "action=" + action + "  _atomhovered=" + _atomhovered;
>    if (action == "start") {
>      timeout ID "hoverEnd" 2.0 "hoverAction('end')";
>    }
> }
> set hoverCallback "jmolscript: hoverAction('start');";
>
> --- Results -------------
> action=start  _atomhovered=25
> action=start  _atomhovered=25
> action=start  _atomhovered=25
> action=start  _atomhovered=25
> action=start  _atomhovered=25
> action=end  _atomhovered=25
> action=start  _atomhovered=25
> action=end  _atomhovered=25
> action=start  _atomhovered=25
> action=end  _atomhovered=25
> -------------------------
>
> Regards,
> Rolf
>
> --
>
> Rolf Huehne
> Postdoc
>
> Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
> Beutenbergstrasse 11
> 07745 Jena, Germany
>
> Phone:   +49 3641 65 6205
> Fax:     +49 3641 65 6210
> E-Mail:  [email protected]
> Website: http://www.fli-leibniz.de
>
>            Scientific Director: Prof. Dr. K. Lenhard Rudolph
>         Head of Administration: Dr. Daniele Barthel
> Chairman of Board of Trustees: Dennys Klein
>
> VAT No: DE 153 925 464
> Register of Associations: No. 230296, Amtsgericht Jena
> Tax Number: 162/141/08228
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> 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
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to