From e6b10585b7661401c80889b380f920780783e6c1 Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Tue, 22 Nov 2022 18:58:31 +0100 Subject: [PATCH] arreglar espaciado al trasponer acordes --- res/static/song.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/res/static/song.js b/res/static/song.js index 50fd498..34c6975 100644 --- a/res/static/song.js +++ b/res/static/song.js @@ -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)