Skip to content

Commit 31b9362

Browse files
author
Gabriel Allegretti
committed
Fixed findNoteAtPos logic
1 parent 5705a7e commit 31b9362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rendering/utils/BeatBounds.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class BeatBounds {
6161
for (let note of this.notes) {
6262
let bottom: number = note.noteHeadBounds.y + note.noteHeadBounds.h;
6363
let right: number = note.noteHeadBounds.x + note.noteHeadBounds.w;
64-
if (note.noteHeadBounds.x >= x && note.noteHeadBounds.y >= y && x <= right && y <= bottom) {
64+
if (note.noteHeadBounds.x <= x && note.noteHeadBounds.y <= y && x <= right && y <= bottom) {
6565
return note.note;
6666
}
6767
}

0 commit comments

Comments
 (0)