Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirement to SetStave before rendering documented (fixes 531) #1199

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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