If you go here: http://sagenb.org:5467/ and type in
var('y')
plot3d(sin(x)*cos(y),(x,-3,3),(y,-4,4))
and evaluate, jmol should pop up with the plot. Right-clicking on the
jmol should bring up the custom menu, but nothing happens.
In the initialization javascript, I have:
------------------------------------
jmolInitialize('/static/jmol');
// TODO: setting the menu doesn't appear to work
// See http://wiki.jmol.org/index.php/Custom_Menus
jmolSetCallback("menuFile","/static/jmol/appletweb/SageMenu.mnu");
------------------------------------
You can download the SageMenu.mnu file, as indicated, from
http://sagenb.org:5467/static/jmol/appletweb/SageMenu.mnu, so jmol
should be able to find the file. Does anyone have any idea why the menu
file isn't showing up? Jonathan, you're the expert here on this. I
can't even get to the error console because I don't know how to do it
without menu.
When I comment out the jmolSetCallback line above, the regular jmol menu
comes up on a right-click.
Thanks,
Jason
Alex Kramer just pointed out to me that the right-click custom menu
*did* work for him on linux. So we started experimenting, and it seems
that the right-click menu works for me (OSX 10.6.8, Firefox 5 or Chrome,
java version [1]) maybe about half of the time. It seems like it works
more when I'm right-clicking off of the surface or bounding box (but
still in the applet).
So I'm chalking this up to the ancient jmol we still have in Sage; so
disregard the message above. I'll look into upgrading the jmol to
Jonathan's most recent work and see if that fixes the problem.
Thanks,
Jason
[1] java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
>
> Alex Kramer just pointed out to me that the right-click custom menu
> *did* work for him on linux. So we started experimenting, and it seems
> that the right-click menu works for me (OSX 10.6.8, Firefox 5 or Chrome,
> java version [1]) maybe about half of the time. It seems like it works
> more when I'm right-clicking off of the surface or bounding box (but
> still in the applet).
>
> So I'm chalking this up to the ancient jmol we still have in Sage; so
> disregard the message above. I'll look into upgrading the jmol to
> Jonathan's most recent work and see if that fixes the problem.
>
I did some more testing and it's not the old version of Jmol. Again,
here is my system:
OSX 10.6.8
Firefix 5
Chrome 12.0.742.112
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
I have the same behavior in the single-cell server's Jmol, sagenb.org's
Jmol (currently the old version), and also Jonathan's test server at
http://141.233.196.149:8888
The behavior seems to be that right-clicking (i.e., control-clicking on
the mac touchpad or right-clicking with a mouse) only shows the menu
when either the right side or the bottom of the menu extends past the
java frame. In the attached picture, that region is shaded in blue.
When I right-click in the blue region, the menu comes up. When I
right-click in the non-blue region, no menu appears.
I tried checking this behavior on the Jmol website, but since the normal
menu is taller than the size of the applet, the menu always appears; I
don't know if it exhibits the same bug and I just don't see it because
of the size of the default menu, or if I don't see the bug because it
isn't running a custom menu.
Jonathan: feel free to forward this report to the jmol list if you think
it is a Jmol issue, rather than an issue with our or your work
integrating Jmol into Sage.
Thanks,
Jason
Great. I'll reply on the JMOL list...
Thanks,
Jason