Skip to content

Commit

Permalink
Merge pull request #1199 from rvilarl/fix/531
Browse files Browse the repository at this point in the history
Requirement to SetStave before rendering documented (fixes 531)
  • Loading branch information
mscuthbert authored Oct 29, 2021
2 parents d0220d2 + 2d84498 commit 3d9f6f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/textnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface TextNoteStruct extends NoteStruct {
/**
* `TextNote` is a notation element that is positioned in time. Generally
* meant for objects that sit above/below the staff and inline with each other.
* `TextNote` has to be assigned to a `Stave` before rendering by means of `SetStave`.
* Examples of this would be such as dynamics, lyrics, chord changes, etc.
*/
export class TextNote extends Note {
Expand Down Expand Up @@ -179,7 +180,10 @@ export class TextNote extends Note {
this.setPreFormatted(true);
}

/** Renders the TextNote. */
/**
* Renders the TextNote.
* `TextNote` has to be assigned to a `Stave` before rendering by means of `SetStave`.
*/
draw(): void {
const ctx = this.checkContext();
const stave = this.checkStave();
Expand Down

0 comments on commit 3d9f6f1

Please sign in to comment.