UPD: Min values for detent settings

This commit is contained in:
Robert Kossessa
2024-06-01 19:56:28 +02:00
parent 3f151254cd
commit 17d655e2aa

View File

@@ -80,14 +80,14 @@ watch(valueMaxInput, (valueMax) => {
watch(totalDetentsInput, (totalDetents) => { watch(totalDetentsInput, (totalDetents) => {
nextTick(() => { nextTick(() => {
totalDetentsInput.value = Math.max(1, Math.min(Number(totalDetents), 9999)) totalDetentsInput.value = Math.max(0, Math.min(Number(totalDetents), 9999))
}) })
emit('update', { haptic: { endPos: totalDetents } }) emit('update', { haptic: { endPos: totalDetents } })
}) })
watch(detentsPerRotationInput, (detentsPerRotation) => { watch(detentsPerRotationInput, (detentsPerRotation) => {
nextTick(() => { nextTick(() => {
detentsPerRotationInput.value = Math.max(1, Math.min(Number(detentsPerRotation), 9999)) detentsPerRotationInput.value = Math.max(0, Math.min(Number(detentsPerRotation), 9999))
}) })
emit('update', { haptic: { detentCount: detentsPerRotation } }) emit('update', { haptic: { detentCount: detentsPerRotation } })
}) })