Re: embedding js9 into a notebook

Nicholas Bollweg <[email protected]>
Newsgroups gmane.comp.python.ipython.devel
Message-ID <CACejjWxvveVrJDzDDJkknmimQpzT8Zn_dQzxLK4aVKMErxdNVQ@mail.gmail.com>
Great, I'm glad you've made progress!

The key method is:

Jupyter.keyboard_manager.register_events($("<selector for the node>"))

The nuclear option may also be worth considering: rendering the whole js9
inside an iframe.

Let me know when you are thinking you've advanced to the point where you
want to try to package the whole thing in a repo. It would be easier to
start collaborating on code, and then be able to get a binder (mybinder.org)
going, then consider how to proceed: pure js nbextension, python backend
(widgets), etc.

On Mon, Dec 7, 2015 at 8:58 AM ericmandel <[email protected]> wrote:

> 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.
> _______________________________________________
> IPython-dev mailing list
> [email protected]
> https://mail.scipy.org/mailman/listinfo/ipython-dev
>

_______________________________________________
IPython-dev mailing list
[email protected]
https://mail.scipy.org/mailman/listinfo/ipython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.