diff --git a/src/components/ColorMapControls.tsx b/src/components/ColorMapControls.tsx index e84260b..47290a9 100644 --- a/src/components/ColorMapControls.tsx +++ b/src/components/ColorMapControls.tsx @@ -156,6 +156,8 @@ export function ColorMapControls(props: ColorMapControlsProps) { [onCmapChange] ); + const shouldDisableLog = values[0] <= 0; + return ( <> onLogScaleChange(e.target.checked)} + disabled={shouldDisableLog} + title={ + shouldDisableLog + ? 'Disabled due to a non-positive vmin value.' + : undefined + } /> Log