Just define a function and call it from your callback:
function myfunc() {
-- Jmol script here --
}
set hoverCallback "jmolscript:myfunc()"
The global variable _atomhovered will contain the atom index of the hovered
atom. So you can investigate it, perhaps:
function testme() {
Var theAtom = {atomindex=_atomHovered}
if (theAtom.elemno==6) {hoverLabel="That's a carbon"} else {hoverLabel =
"That's not a carbon"}
}
set hovercallback "jmolscript:testme()"
On Sun, Apr 14, 2013 at 5:21 PM, N David Brown <hubd...@gmail.com> wrote:
> *I've seen this in the documentation:*
> *
> *
> * set hoverCallback "jmolscript:script hover.spt"*
> *
> *
> I'd like my JAR to not have to deploy files like this hover.spt to the
> environment.
>
> Is there an in-JAR filepath you can specify here?
>
> Or an inline script variation?
>
> Dave
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers