-
Notifications
You must be signed in to change notification settings - Fork 9
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
Canvas doesn't render until after resize #3 #3
Comments
@AnthonyAndroulakis , not sure exactly what's happening here, but the most recent version of Niivue ( Line 62 in 825834f
|
I was able to make a widget that just draws a point to a canvas with a webgl2 canvas (and get it to display without having to resize). I'm thinking perhaps the issue lies with not using await/async when using Niivue. update: I tried using async/await and it did not fix the issue. |
@AnthonyAndroulakis I can not run your demo:
I do wonder if we need to await the canvas:
|
Check if jupyter-ui-poll works, instead of jupyter_ui_poll. I remember
having an issue like that at some point. I think I probably fixed that in a
PR that is currently stocked due to other issues presumably Java-side.
Best,
Christian
…On Sun, Sep 24, 2023 at 4:40 PM Chris Rorden ***@***.***> wrote:
@AnthonyAndroulakis <https://github.com/AnthonyAndroulakis> I can not run
your demo:
Looking for: ['jupyterlab=3', 'pip', 'ipyevents', 'ipywidgets', 'jupyter_ui_poll', 'traitlets']
Could not solve for environment specs
The following package could not be installed
└─ jupyter_ui_poll does not exist (perhaps a typo or a missing channel)
I do wonder if we need to await the canvas
<https://stackoverflow.com/questions/49491139/canvas-sometimes-does-not-resize-to-width-and-height>
:
document.onreadystatechange = function () {
if (document.readyState === "interactive") {
// Your code.
}
}
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNIPGST3HBYP7MQVKHS47TX4CLDZANCNFSM6AAAAAAQ643S3Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
When initializing a new Niivue widget using the following script
the canvas shows up as blank with a black background. The expected result would be to see red text on the black background saying "Waiting for images...".
The expected result shows only after the window has been resized.
edit: mybinder () can be used to view the bug in jupyter online
The text was updated successfully, but these errors were encountered: