Skip to content

Commit

Permalink
typedoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed Jan 1, 2022
1 parent cf3f2de commit 4b14a63
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/api/assets/search.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/api/classes/Flow.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { Note } from './note';
import { NoteHead } from './notehead';
import { NoteSubGroup } from './notesubgroup';
import { Ornament } from './ornament';
import { Parenthesis } from './parenthesis';
import { Parser } from './parser';
import { PedalMarking } from './pedalmarking';
import { Registry } from './registry';
Expand Down Expand Up @@ -139,6 +140,7 @@ export class Flow {
static NoteHead = NoteHead;
static NoteSubGroup = NoteSubGroup;
static Ornament = Ornament;
static Parenthesis = Parenthesis;
static Parser = Parser;
static PedalMarking = PedalMarking;
static Registry = Registry;
Expand Down
11 changes: 9 additions & 2 deletions src/parenthesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ModifierContextState } from './modifiercontext';
import { Note } from './note';
import { Tables } from './tables';

/** Parenthesis implements parenthesis modifiers for notes.*/
/** Parenthesis implements parenthesis modifiers for notes. */
export class Parenthesis extends Modifier {
static get CATEGORY(): string {
return 'Parenthesis';
Expand All @@ -24,7 +24,7 @@ export class Parenthesis extends Modifier {
}
}

/** Arrange parenthesis inside a ModifierContext. */
/** Arrange parentheses inside a ModifierContext. */
static format(parentheses: Parenthesis[], state: ModifierContextState): boolean {
const { right_shift, left_shift } = state;

Expand Down Expand Up @@ -58,6 +58,11 @@ export class Parenthesis extends Modifier {
return true;
}

/**
* Constructor
*
* @param position Modifier.Position.LEFT (default) or Modifier.Position.RIGHT
*/
constructor(position: ModifierPosition) {
super();

Expand All @@ -67,6 +72,7 @@ export class Parenthesis extends Modifier {
this.setWidth(Tables.currentMusicFont().lookupMetric('parenthesis.default.width'));
}

/** Set the associated note. */
setNote(note: Note): this {
this.note = note;
this.point = Tables.currentMusicFont().lookupMetric('parenthesis.default.point');
Expand All @@ -78,6 +84,7 @@ export class Parenthesis extends Modifier {
return this;
}

/** Render the parenthesis. */
draw(): void {
const ctx = this.checkContext();
const note = this.checkAttachedNote();
Expand Down

0 comments on commit 4b14a63

Please sign in to comment.