Skip to content

Commit

Permalink
fix(chord chart): center the watermark on the fretboard in horizontal…
Browse files Browse the repository at this point in the history
… orientation
  • Loading branch information
omnibrain committed Oct 15, 2022
1 parent e4b3ce2 commit 729b889
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/svguitar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ export class SVGuitarChord {
textX = startX + (endX - startX) / 2
textY = y + padding
} else {
textX = y / 2
const lastFret = y
const firstFret = y - (this.settings.frets ?? defaultSettings.frets) * this.fretSpacing()
textX = firstFret + (lastFret - firstFret) / 2
textY = this.y(startX, 0) + padding
}

Expand Down

0 comments on commit 729b889

Please sign in to comment.