mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2024-12-22 00:33:33 +01:00
arreglar espaciado al trasponer acordes
This commit is contained in:
parent
36db883be7
commit
e6b10585b7
1 changed files with 5 additions and 1 deletions
|
@ -33,12 +33,16 @@ function transpose(n) {
|
|||
function transposeAdd(n) {
|
||||
for (c of document.getElementsByClassName('c')) {
|
||||
chord = c.innerHTML
|
||||
nbsp = chord.endsWith(" ")
|
||||
if (nbsp) {
|
||||
chord = chord.slice(0, -6)
|
||||
}
|
||||
if (LAT_INDEX[chord] == undefined) {
|
||||
throw Error("Unknown chord: " + chord)
|
||||
}
|
||||
i = LAT_INDEX[chord]
|
||||
j = (i + n + 12) % 12
|
||||
c.innerHTML = CHORDS_LAT[j]
|
||||
c.innerHTML = CHORDS_LAT[j] + (nbsp ? " " : "")
|
||||
}
|
||||
|
||||
setTransposeSelector(getTranspose() + n)
|
||||
|
|
Loading…
Reference in a new issue