Weird hybrid

This commit is contained in:
2025-10-06 14:31:05 +02:00
parent ff5add97e8
commit 90f2f4209c
10 changed files with 405 additions and 103 deletions

View File

@ -31,7 +31,15 @@ export function Slider({
mappedLFOs = []
}: SliderProps) {
const mappingModeState = useStore(mappingMode)
const displayValue = formatValue && valueId ? formatValue(valueId, value) : `${value}${unit || ''}`
const formatNumber = (num: number) => {
if (Number.isInteger(num)) return num.toString()
return num.toFixed(1)
}
const displayValue = formatValue && valueId
? formatValue(valueId, value)
: `${formatNumber(value)}${unit || ''}`
const isInMappingMode = !!(mappingModeState.isActive && paramId)
const hasMappings = mappedLFOs.length > 0