From 3afbc8a6328278faf2e484321d27678e8ae58b0f Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Thu, 5 Oct 2023 20:44:30 -0600 Subject: [PATCH] Fix raster editor bug --- geemap/map_widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geemap/map_widgets.py b/geemap/map_widgets.py index cfa02f8a9c..61ae8293a8 100644 --- a/geemap/map_widgets.py +++ b/geemap/map_widgets.py @@ -50,6 +50,7 @@ def _set_css_in_cell_output(): class Theme: """Applies dynamic theme in Colab, otherwise light.""" + current_theme = "colab" if common.in_colab_shell() else "light" @staticmethod @@ -1038,7 +1039,10 @@ def __init__(self, host_map, layer_dict): self._max_value = self._vis_params["max"] self._right_value = 2 * self._max_value if "gamma" in self._vis_params.keys(): - self._layer_gamma = self._vis_params["gamma"] + if isinstance(self._vis_params["gamma"], list): + self._layer_gamma = self._vis_params["gamma"][0] + else: + self._layer_gamma = self._vis_params["gamma"] if "bands" in self._vis_params.keys(): self._sel_bands = self._vis_params["bands"] if "palette" in self._vis_params.keys():