From 35d2fe64f98a61604d0ddb8535465a8518ed4eb3 Mon Sep 17 00:00:00 2001 From: ycl Date: Sun, 23 Jul 2023 12:15:42 -0500 Subject: [PATCH] return noteheads after build --- src/stavenote.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stavenote.ts b/src/stavenote.ts index dd6b2b5ca9..3a95288124 100644 --- a/src/stavenote.ts +++ b/src/stavenote.ts @@ -487,7 +487,7 @@ export class StaveNote extends StemmableNote { } // Builds a `NoteHead` for each key in the note - buildNoteHeads(): void { + buildNoteHeads(): NoteHead[] { this._noteHeads = []; const stemDirection = this.getStemDirection(); const keys = this.getKeys(); @@ -548,6 +548,7 @@ export class StaveNote extends StemmableNote { this.addChildElement(notehead); this._noteHeads[this.sortedKeyProps[i].index] = notehead; } + return this._noteHeads; } // Automatically sets the stem direction based on the keys in the note