From 7ec8832ad3f436f3a85ac6aa8845c35840015e76 Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Thu, 14 Nov 2024 11:49:15 +0000 Subject: [PATCH] Keep black < white (#287) --- src/ui/color-panel.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ui/color-panel.ts b/src/ui/color-panel.ts index f5bbc8b..27d858a 100644 --- a/src/ui/color-panel.ts +++ b/src/ui/color-panel.ts @@ -277,12 +277,20 @@ class ColorPanel extends Container { updateOp((op) => { op.newState.blackPoint = value; }); + + if (value > whitePointSlider.value) { + whitePointSlider.value = value; + } }); whitePointSlider.on('change', (value: number) => { updateOp((op) => { op.newState.whitePoint = value; }); + + if (value < blackPointSlider.value) { + blackPointSlider.value = value; + } }); transparencySlider.on('change', (value: number) => {