Skip to content

Commit 02412af

Browse files
authored
Fix: sugarlabs#4128 White and Black key generation is consistent (sugarlabs#4129)
* black keys * keyboard final fix
1 parent d138483 commit 02412af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/widgets/musickeyboard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,7 +2619,7 @@ function MusicKeyboard(activity) {
26192619
parenttbl2 = document.getElementById("myrow2");
26202620
newel2 = document.createElement("td");
26212621
newel2.setAttribute("id", "blackRow" + myrow2Id.toString());
2622-
if ([2, 6, 9, 13, 16, 20].includes(myrow2Id)) {
2622+
if ([2, 6, 9, 13, 16, 20, 23, 27, 30, 34, 37, 41, 44, 48, 51, 55, 58, 62].includes(myrow2Id)) {
26232623
parenttbl2.appendChild(newel2);
26242624
el = docById("blackRow" + myrow2Id.toString());
26252625
el.style.background = "transparent";
@@ -2717,7 +2717,7 @@ function MusicKeyboard(activity) {
27172717
newel2 = document.createElement("td");
27182718
newel2.setAttribute("id", "blackRow" + myrow2Id.toString());
27192719
newel2.style.textAlign = "center";
2720-
if ([2, 6, 9, 13, 16, 20].includes(myrow2Id)) {
2720+
if ([2, 6, 9, 13, 16, 20, 23, 27, 30, 34, 37, 41, 44, 48, 51, 55, 58, 62].includes(myrow2Id)) {
27212721
parenttbl2.appendChild(newel2);
27222722
el = docById("blackRow" + myrow2Id.toString());
27232723
el.style.background = "transparent";
@@ -2769,7 +2769,7 @@ function MusicKeyboard(activity) {
27692769
// elementid2 = document.getElementsByTagName("td").length;
27702770
newel2.setAttribute("id", "blackRow" + myrow2Id.toString());
27712771
newel2.style.textAlign = "center";
2772-
if ([2, 6, 9, 13, 16, 20].includes(myrow2Id)) {
2772+
if ([2, 6, 9, 13, 16, 20, 23, 27, 30, 34, 37, 41, 44, 48, 51, 55, 58, 62].includes(myrow2Id)) {
27732773
parenttbl2.appendChild(newel2);
27742774
el = docById("blackRow" + myrow2Id.toString());
27752775
el.style.background = "transparent";

0 commit comments

Comments
 (0)