From f631672f626897c70dbe07e5bcaa08e92fde99c7 Mon Sep 17 00:00:00 2001 From: Jeremy Myers Date: Fri, 6 Mar 2026 11:37:15 -0500 Subject: [PATCH] Disable log transform when vmin is non-positive --- src/components/ColorMapControls.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) 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