-
Notifications
You must be signed in to change notification settings - Fork 64
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
Draw synced data at canvas creation #65
Conversation
Signed-off-by: martinRenou <[email protected]>
c9bd22c
to
e6f80a2
Compare
Hmm, this currently works for me, but only with Is this fixable as well? I mainly use the MultiCanvas, as I am using interactive features and it seems great for that. |
Right, it should be easily fixable. A workaround for you would be to set Subcanvases are in private APIs, so it is not perfect. We need to expose |
ah yes, nice - the refresh works when setting However - I still don't see the canvases when converted to HTML: (left is converted with It seems a bit... flaky? Sometimes I see some of the drawn shapes, but not the background image, sometimes I see nothing in the converted HTML. |
What is your workflow exactly with nbconvert? So I can reproduce |
I wonder if nbconvert is not missing all the comm messages, like voilà does https://ipycanvas.readthedocs.io/en/latest/advanced.html Unfortunately, using the The way I understand the problem is that None of these draw commands are saved in the Python widget model, which is why when you actually display the Canvas when opening the I guess all of I just said is only true if you provide |
However, without the Edit: |
Hi, my workflow right now is the following:
This does produce "working" widgets for I recently saw that nbconvert is thinking about including a web-browser "screenshot" preprocessing step for widgets, which would probably solve these problems: Until then, I think keeping screenshots is completely fine; I was just (as always!) looking for a way to automate things :P thanks for looking into this, I really appreciate it! |
Just for reference, in case someone else would like to try it, I now use a little hack: at the end of my documentation notebook (in which I manually execute all the cells, and do some canvas interactions), I get the image data, and convert it to a Unfortunately the annotation does still have to happen completely manual, presumably because of the issue with the lack of client that you mention. |
This will fix #64
It also allows retrieving the canvas image when refreshing the page:
This is only possible when setting
sync_image_data
toTrue