todo: fix wrong offset

This commit is contained in:
Julien Calixte
2025-02-22 23:19:09 +01:00
parent 8a637bf4c1
commit 6bbf2945c2

View File

@@ -13,11 +13,15 @@ export const useNoteOverlay = (
const { x, y, isMobile } = useOverlay()
const noteHeight = ref(0)
// TODO: it seems to have a wrong offset,
// visible when there are a lot of notes.
const displayNoteOverlay = computed(() => {
const valueIndex = toValue(index)
if (isMobile.value) {
return y.value > toValue(index) * noteHeight.value
return y.value > valueIndex * noteHeight.value
} else {
return x.value > toValue(index) * NOTE_WIDTH
return x.value > valueIndex * NOTE_WIDTH
}
})