Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix ipywidget Output widget bug #487

Merged
merged 1 commit into from
Jul 2, 2023
Merged

Fix ipywidget Output widget bug #487

merged 1 commit into from
Jul 2, 2023

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Jul 2, 2023

Leafmap uses ipywidget's Output widget heavily to display text and plots. It appears that Output widget behaves different in different environments, causing issues such as disappearing maps in ArcGIS Pro.

The problematic way:

import ipywidgets as widgets
output = widgets.Output()
with output:
    print('Hello World')
output
output.clear_output()

The recommended way:

import ipywidgets as widgets
output = widgets.Output()
output.append_stdout('Hello World')
# output.append_display_data(data)
output
output.outputs = ()

Relevant issues:

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

@github-actions github-actions bot temporarily deployed to pull request July 2, 2023 05:39 Inactive
@giswqs giswqs merged commit 1eeeddf into master Jul 2, 2023
@giswqs giswqs deleted the output branch July 2, 2023 11:53
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this pull request Jul 10, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this pull request Jul 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant