Skip to content

Commit

Permalink
Merge pull request #1148 from ronyeh/fix/noteStructs2
Browse files Browse the repository at this point in the history
Fix Tests, Remove Partial<...>, Prefer Optional Fields
  • Loading branch information
0xfe authored Oct 1, 2021
2 parents 55a55fd + 3f7d02f commit 961f26a
Show file tree
Hide file tree
Showing 65 changed files with 926 additions and 1,058 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Please help test this beta release and [report issues on GitHub](https://github.
- Examples:
- `Accidental.CATEGORY` is now `'Accidental'` instead of `'accidentals'`.
- `Modifier.CATEGORY` is now `'Modifier'` instead of `'none'`.
- `ChordSymbol.NO_TEXT_FORMAT` was previously named `ChordSymbol.NOTEXTFORMAT`.

# 3.0.9 / 2020-04-21

Expand Down
2 changes: 1 addition & 1 deletion src/accidental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class Accidental extends Modifier {
prevNote = note;
}
if (stave) {
const lineSpace = stave.getOptions().spacing_between_lines_px;
const lineSpace = stave.getSpacingBetweenLines();
const y = stave.getYForLine(props.line);
const accLine = Math.round((y / lineSpace) * 2) / 2;
accList.push({ y, line: accLine, shift: shiftL, acc, lineSpace });
Expand Down
2 changes: 1 addition & 1 deletion src/barnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class BarNote extends Note {
// Initialized by the constructor via this.setType(type)
protected type!: BarlineType;

constructor(type = BarlineType.SINGLE) {
constructor(type: string | BarlineType = BarlineType.SINGLE) {
super({ duration: 'b' });

this.metrics = {
Expand Down
Loading

0 comments on commit 961f26a

Please sign in to comment.