[IPython-dev] embedding js9 into a notebook
ericmandel
eric at cfa.harvard.edu
Mon Dec 7 08:49:18 EST 2015
We’ve made some progress integrating JS9 image display into Jupyter. Try
executing this in a cell:
%%html
<div class="JS9Menubar"></div>
<div class="JS9"></div>
<link type="text/css" rel="stylesheet"
href="//js9.si.edu/jupyter/js9-allinone.css">
If you do not have astronomical data, you should be able to drag and drop a
png file onto the display. Create a region from the Regions menu, select an
analysis tool like 3dPlot from the Analysis menu, click the region and move
it around, etc …
The one thing that really does not work is keyboard input into dialog boxes.
For example, in the Zoom menu, click the “numeric zoom value” box and try to
enter a zoom factor. The whole display disappears, presumably because the
keypress event is being interpreted as a Jupyter command/edit keypress.
Is there a simple way to focus keyboard events away from Jupyter itself? My
colleague Gijs Molenaar, who actually understands Jupyter (I’m the author of
JS9 and know next to nothing) will get back to this, but for now, it would
be great to be able to tell early adopters how to run JS9 in Jupyter without
crashing it.
If the answer is that one cannot wrestle the keyboard focus away from
Jupyter, I can disable the dialog boxes. But in that case, it would be
really useful to know that JS9 is in the Jupyter environment. Does Jupyter
load any unique JavaScript or set a variable that I can check for in order
to sense the environment?
--
View this message in context: http://python.6.x6.nabble.com/embedding-js9-into-a-notebook-tp5173096p5178693.html
Sent from the IPython - Development mailing list archive at Nabble.com.
More information about the IPython-dev
mailing list