InsightSoftwareConsortium / itkwidgets

An elegant Python interface for visualization on the web platform to interactively generate insights into multidimensional images, point sets, and geometry.
https://itkwidgets.readthedocs.io/
Apache License 2.0
576 stars 83 forks source link

Fullscreen button does not work #693

Open PaulHax opened 9 months ago

PaulHax commented 9 months ago

The fullscreen button does not work.
image

Works in https://github.com/InsightSoftwareConsortium/itk-viewer-bootstrap-ui

Probably need to add allow="fullscreen" to the iframe: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#allowfullscreen

PaulHax commented 9 months ago

Given imjoy docs https://github.com/imjoy-team/ImJoy/blob/c255d9cda9dc19d441fb7cf1eaca806e5ec71af8/docs/development.md#permissions

I tried this: https://github.com/PaulHax/itkwidgets/commit/a796f037be4b2ce0332496d23f33c3618c5e04a6

But did not work. Maybe we can querySelector() in python for the iframe and set allow="fullscreen"?

thewtex commented 9 months ago

CC @bnmajor @oeway

oeway commented 9 months ago

Hi I just checked, it appears that it's not possible to request fullscreen from within the iframe itself, the fullscreen should be done in the host window. This means we need to implement it in python as suggested by @PaulHax . And we might need to still add allow="fullscreen" to the iframe as I understand.