Skip to content

Commit

Permalink
PR #609 include to allow styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed May 7, 2021
1 parent c273bfb commit b30d1a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/barnote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ export class BarNote extends Note {

// Render note to stave.
draw(): void {
this.checkContext();
const ctx = this.checkContext();
if (!this.stave) throw new Vex.RERR('NoStave', "Can't draw without a stave.");
L('Rendering bar line at: ', this.getAbsoluteX());
if (this.style) this.applyStyle(ctx);
const barline = new Barline(this.type);
barline.setX(this.getAbsoluteX());
barline.draw(this.stave);
if (this.style) this.restoreStyle(ctx);
this.setRendered();
}
}

0 comments on commit b30d1a4

Please sign in to comment.