You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
anywidget in vscode: snapshot stays pending when canvas isn't visible #218
I am on my laptop at the moment, So my screen is only 1080 pixels tall. When I tried the example notebook I noticed something odd:
canvas_outofview.mp4
if the canvas is not visible, the screenshot remains pending. So if you never let a cell output the canvas, screenshot remains pending. But also if you scroll the screenshot out of the view. I tried to read the code a bit or even debug step it. I saw there was even logic for this exact case.
and (self._has_visible_viewsorself._rfb_pending_snapshot_display)
)
# Do the draw if we should.
But it seems like we never get there in the first place. _maybe_draw never gets reached, because _shedule_maybe_draw never gets reached but _rc_request_draw seems to only get reached when the canvas is running... so I looked into the self.request_draw() situation and that said it sets a flag that only works in "ondemand" mode.
so I tried that update mode and now the snapshots is response, even without a canvas in view. But not if you never let the canvas display in the first case (while a closed canvas is okay...).
So something in the timeline is not working out. Perhaps it would be okay to but a _shedule_maybe_draw at the end of .snapshot?
Activity