-
Notifications
You must be signed in to change notification settings - Fork 33
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
Cesium Widget full screen does not behave properly in Jupyter #64
Comments
Ran in breakpoint on click in Opera debugger found the following when I stepped through clicking the full screen button in the Cesium widget:
Excerpt from Cesium.js starting at line 8345:
|
Addressing the issue part first:
Line 68 in 328608f
The latest version has to be specified manually. Can you try
Confirmed in my computer. In the Cesium sandcastle, this works normally: https://sandcastle.cesium.com/ Googling the error throws things like this Stack Overflow answer:
Which is reasonable, but there was a user event: we clicked the button! Therefore, perhaps something is intercepting the click event. I see two possibilities:
I would start by looking at the first option, perhaps outside of a notebook environment (see for example #53). |
Hi @astrojuanlu , I have worked on this issue. I was able to solve the missing earth problem. We need to generate a Cesium ion token before can proceed to display plots. To generate a free token, I followed this link . And after that, I also made a few modifications to the widgets.py file. Everything seems to be working now. However, with the fullscreen issue, I have worked up to a point where if you perform "cesium_widget_object.fullscreen()" in a python code, you will be able to trigger the fullscreen mode of the canvas. I was not satisfied here so I tried to write a bit of javascript event listener code in the CESIUM_TPL string of widgets.py and tried to bind the event listeners on the fullscreen button. Now the functions are being triggered correctly. Meaning, if you click on the "fullscreen" button of the CZMLWidget, a JavaScript code responsible to "FULLSCREEN-ize" the canvas gets triggered. But after all this, I got this error: "Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture." This is not easily solvable since it will require external permissions. More here. To summarize, we have 1 success, 1 partial success, 1 partial failure. So apart from the 1 partial failure, may I create a pull request? Oh, and BTW I was able to make czml work for more than just the "simple.py" example given in the czml3 file. So I believe this will also cover Poliastro's issue #706. Thanks a lot for following through. Would love to elaborate more. 😄 Code Responsilbe for switching to fullscreen This code piece can be included with the object itself as I mentioned earlier. |
Copy pasting a comment I left in #92:
|
Try C137.js. It's open source now, Apache 2.0 licensed: |
🐞 Problem
Cesium widget has a full-scree button in the lower right hand corner. Pressing it should make the window go full screen, however it has a different behavior. It seems that it makes the entire Jupyter notebook full screen and sets the background outside of the notebook to be the same as a the widget. Screenshot below:
🖥 Please paste the output of following commands
Observed on both Chrome Version 80.0.3987.163 (Official Build) (64-bit) and Opera v67.0.3575.115 on Windows 10 Version 1909.
conda info -a
(only if you have conda)conda list
(only if you have conda)pip freeze
Code to reproduce:
Another note:
The missing Earth map in the screenshot is fixed by changing to a different map skin. I think this is due to some subscription access or something. That issue is not related to this issue (as far as I know).
The text was updated successfully, but these errors were encountered: