UPD: Min values for detent settings
This commit is contained in:
@@ -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 } })
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user