Skip to content
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

Handle clear output messages #39

Open
mozzhorin opened this issue Jun 5, 2018 · 3 comments
Open

Handle clear output messages #39

mozzhorin opened this issue Jun 5, 2018 · 3 comments

Comments

@mozzhorin
Copy link

(Sorry, I don't have any experience with JS and HTML)
I've built a plotting widget in a Jupyter Notebook using bqplot. It uses IPython.display.clear_output() to redraw everything, which doesn't work on ipywidgets_server. Is there any other way clear the output?
And is it possible to embed a widget from ipywidgets_server in a web page?

@pbugnion pbugnion changed the title Clear output Handle clear output messages Jun 6, 2018
@pbugnion
Copy link
Owner

pbugnion commented Jun 6, 2018

At the moment, we don't catch the clear_output messages on the frontend, but that sounds like something we should do.

PRs welcome! If anyone wants to tackle this, shout out here and I can try to come up with more detail.

As a work-around, I suggest embedding your widget in a container (like an HBox or a VBox) and changing that container's children instead of clearing the output.

@pbugnion
Copy link
Owner

pbugnion commented Jun 6, 2018

I replied to your second question in a separate issue (issue #40) for greater discoverability.

@mozzhorin
Copy link
Author

Thanks, I've tried it before but haven't succeeded. I'll try more and if I manage that I'll write here my solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants