Skip to content

Commit

Permalink
Keep black < white (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Nov 14, 2024
1 parent 84cdf38 commit 7ec8832
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ui/color-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 7ec8832

Please sign in to comment.