Fix stave vertical placement: compensate VexFlow space_above_staff_ln offset in live staff and phrase rows (verified via screenshots)

This commit is contained in:
2026-09-14 02:21:33 +02:00
parent 7d4c71539a
commit 173c4c56bc
4 changed files with 51 additions and 22 deletions

View File

@@ -236,7 +236,9 @@ export const PhraseSheetMusic: React.FC<PhraseSheetMusicProps> = ({
// ---- Staves, voices, formatting, drawing -----------------------------
for (let r = 0; r < rowFragmentList.length; r++) {
const y = r * rowHeight + 26;
// VexFlow draws stave lines ~40.5px below the constructor y —
// center the staff in the row and leave ledger headroom below.
const y = r * rowHeight + 9;
const rowMeasureNumbers: number[] = [];
for (let b = 0; b < barsPerRow; b++) {
const m = r * barsPerRow + b;