Fix tempo slider thumb alignment
This commit is contained in:
1 parent
aaed0f3548
commit
3bb59d6021
2 files changed
+1
-1
No files matched your search
@@ -16,7 +16,7 @@ const TEMPO_THUMB_SIZE = 18;
|
||||
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
||||
const popover = usePopoverDisclosure();
|
||||
const tempoProgress = ((tempoBpm - MIN_TEMPO_BPM) / (MAX_TEMPO_BPM - MIN_TEMPO_BPM)) * 100;
|
||||
const tempoThumbCenter = (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE) / 2
|
||||
const tempoThumbCenter = TEMPO_THUMB_SIZE / 2
|
||||
+ ((100 - tempoProgress) / 100) * (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user