Skip to content

Commit 627fcc0

Browse files
committed
Fix shift+arrows for L field
1 parent 92986f4 commit 627fcc0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stores/current.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function aggressiveRoundValue<V extends Partial<LchValue>>(
161161
): V {
162162
let rounded = { ...value }
163163
if (typeof rounded.l !== 'undefined') {
164-
rounded.l = type === 'oklch' ? round4(rounded.l) : round2(rounded.l)
164+
rounded.l = round4(rounded.l)
165165
}
166166
if (typeof rounded.c !== 'undefined') {
167167
rounded.c = type === 'oklch' ? round4(rounded.c) : round2(rounded.c)

view/card/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function clampInRange(useWheel: boolean, precision: number): ClampAngleFn {
3535
function initInput(type: 'a' | 'c' | 'h' | 'l'): HTMLInputElement {
3636
let card = document.querySelector<HTMLDivElement>(`.card.is-${type}`)!
3737
let text = card.querySelector<HTMLInputElement>('[role=spinbutton]')!
38-
let bindedClamp = clampInRange(type === 'h', type === 'c' ? 4 : 2)
38+
let bindedClamp = clampInRange(type === 'h', type === 'h' ? 2 : 4)
3939

4040
text.addEventListener('change', () => {
4141
let { max, min } = getInputMeta(text)

0 commit comments

Comments
 (0)