-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display PNG preview for widget #2682
Comments
I don't think so, since you are actually asking the system to rerender the displayed output with that update_display command. |
Hmm, is there no way to go around the Perhaps it could be snuck in on the client? |
I think the answer to your question is no (as in I think I understand what you are trying to do in your workaround), but having a more comprehensive self-contained example to see exactly what you are doing would be helpful. In particular, it seems that you are updating the actual display that contains a widget, so that the mimebundle has both the widget and a png?
That would probably be an issue for the particular client (notebook, lab, etc.), then. |
That said, you can see previous discussion about this topic at #2280 |
(ah, from higlass/higlass-python#49 it looks like you knew about #2280) |
Yes, that's exactly right. If I do this manually by going in changing the saved As you saw, there were a few threads I was looking at and what I wanted to accomplish seemed so tantalizingly close that I thought it best to just ask. Anyway, thanks for your help. I'll poke around those threads some more. #314 looks promising. |
Great, thanks for looking into this. A lot of people would love this. It seems like a tricky problem to solve in general, but perhaps an abstract method could be extended by each widget to provide a snapshot of itself, and that could be utilized in a general solution to save a snapshot of the top-level widget. |
Hey! I have an IPython widget that somewhat resembles an interactive map. Whenever the user pans or zooms, the view changes. When the notebook is saved, stored and viewed on GitHub, I would like to see a preview of what was visible when the notebook was saved.
AFAICT, to accomplish this I need to set
outputs["data"]["image/png"]
in the notebook's saved JSON representation.To do that I've tried the following:
@observe
-ed and every time it changes I callupdate_display
:This seems to work except that it reloads the widget as well (i.e. it disappears and reappears again). My question is, is there a way to dynamically update the cell's data without reloading the widget?
The text was updated successfully, but these errors were encountered: