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
Binary file not shown.
@@ -16,7 +16,7 @@ const TEMPO_THUMB_SIZE = 18;
|
|||||||
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
export const TempoControl = memo(function TempoControl({ tempoBpm, onTempoChange }: TempoControlProps) {
|
||||||
const popover = usePopoverDisclosure();
|
const popover = usePopoverDisclosure();
|
||||||
const tempoProgress = ((tempoBpm - MIN_TEMPO_BPM) / (MAX_TEMPO_BPM - MIN_TEMPO_BPM)) * 100;
|
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);
|
+ ((100 - tempoProgress) / 100) * (TEMPO_TRACK_HEIGHT - TEMPO_THUMB_SIZE);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in new issue
Block a user