Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions geemap/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ def __init__(
callback=self._toggle_callback,
reset=True,
)
self.main_tools = main_tools + ([self.toggle_widget] if extra_tools else [])
self.extra_tools = extra_tools
# Use hold_trait_notifications to avoid triggering widget serialization
# during initialization, which can cause issues in Solara and other environments.
with self.hold_trait_notifications():
self.main_tools = main_tools + ([self.toggle_widget] if extra_tools else [])
self.extra_tools = extra_tools
for widget in self.main_tools + self.extra_tools:
widget.callback_wrapper = lambda callback, value, tool: callback(
self.host_map, value, tool
Expand Down