Skip to content

Commit

Permalink
Fix ipywidget Output widget bug (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jul 2, 2023
1 parent e64fa61 commit 1eeeddf
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 97 deletions.
2 changes: 1 addition & 1 deletion leafmap/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def show_image(img_path, width=None, height=None):
out = widgets.Output()
# layout={'border': '1px solid black'})
# layout={'border': '1px solid black', 'width': str(width + 20) + 'px', 'height': str(height + 10) + 'px'},)
out.clear_output(wait=True)
out.outputs = ()
display(out)
with out:
file = open(img_path, "rb")
Expand Down
6 changes: 3 additions & 3 deletions leafmap/leafmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def handle_draw(target, action, geo_json):
import ipysheet

with self.edit_output:
self.edit_output.clear_output()
self.edit_output.outputs = ()
self.edit_sheet = ipysheet.from_dataframe(
self.get_draw_props(n=self.num_attributes, return_df=True)
)
Expand Down Expand Up @@ -1574,7 +1574,7 @@ def add_colorbar(
**kwargs,
)
with output:
output.clear_output()
output.outputs = ()
display(colormap)

self.colorbar = colormap_ctrl
Expand Down Expand Up @@ -1626,7 +1626,7 @@ def add_colormap(
transparent_bg=transparent_bg,
)
with output:
output.clear_output()
output.outputs = ()
plot_colormap(
cmap,
colors,
Expand Down
Loading

0 comments on commit 1eeeddf

Please sign in to comment.