Skip to content

Commit

Permalink
fix logic for setting plot options state when setting cmap through API
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jul 19, 2022
1 parent d24f823 commit 2d7ba7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1584,8 +1584,8 @@ def _on_glue_value_changed(self, value):
return

self._processing_change_from_glue = True
if "Colormap" in value.__class__.__name__: # TODO: better logic
value = str(value)
if "Colormap" in value.__class__.__name__:
value = value.name
elif isinstance(self.value, (int, float)) and self._glue_name != 'percentile':
# glue might pass us ints for float or vice versa, but our traitlets care
# so let's cast to the type expected by the traitlet to avoid having to
Expand Down

0 comments on commit 2d7ba7f

Please # to comment.