Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed Jan 8, 2022
1 parent a8191ab commit aebecd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/stave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export class Stave extends Element {
}

// Section functions
setSection(section: string, y: number, xOffset = 0, fontSize = 12) {
setSection(section: string, y: number, xOffset = 0, fontSize = 10) {
const staveSection = new StaveSection(section, this.x + xOffset, y);
staveSection.setFontSize(fontSize);
this.modifiers.push(staveSection);
Expand Down
6 changes: 3 additions & 3 deletions src/stavesection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class StaveSection extends StaveModifier {

static TEXT_FONT: Required<FontInfo> = {
family: Font.SANS_SERIF,
size: 12,
size: 10,
weight: FontWeight.BOLD,
style: FontStyle.NORMAL,
};
Expand All @@ -29,7 +29,7 @@ export class StaveSection extends StaveModifier {
this.x = x;
this.shift_x = 0;
this.shift_y = shift_y;
this.setFont('bold 12pt sans-serif');
this.resetFont();
}

setStaveSection(section: string): this {
Expand Down Expand Up @@ -67,7 +67,7 @@ export class StaveSection extends StaveModifier {
let x = this.x + shift_x;
ctx.beginPath();
ctx.setLineWidth(2);
ctx.rect(x, y + textHeight / 8, width, height);
ctx.rect(x, y + textHeight / 4, width, height);
ctx.stroke();
x += (width - textWidth) / 2;
ctx.fillText('' + this.section, x, y + 16);
Expand Down

0 comments on commit aebecd4

Please sign in to comment.