Skip to content

Commit

Permalink
typo on previous commit again
Browse files Browse the repository at this point in the history
  • Loading branch information
gawainhewitt committed Sep 20, 2022
1 parent 6b79e5e commit b41e035
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ <h1>loading...<br>loading...<br>loading...<br>loading...<br>loading...<br>loadin
<br>
</div>
<div id="notesDiv">
<div id="image0"><h2>C</h2></div>
<div id="image1"><h2>D</h2></div>
<div id="image2"><h2>E</h2></div>
<div id="image3"><h2>F</h2></div>
<div id="image4"><h2>G</h2></div>
<div id="image5"><h2>A</h2></div>
<div id="image6"><h2>B</h2></div>
<div id="image7"><h2>C</h2></div>
<div id="image8"><h2>D</h2></div>
<div id="image0"><h2 id="i0">C</h2></div>
<div id="image1"><h2 id="i1">D</h2></div>
<div id="image2"><h2 id="i2">E</h2></div>
<div id="image3"><h2 id="i3">F</h2></div>
<div id="image4"><h2 id="i4">G</h2></div>
<div id="image5"><h2 id="i5">A</h2></div>
<div id="image6"><h2 id="i6">B</h2></div>
<div id="image7"><h2 id="i7">C</h2></div>
<div id="image8"><h2 id="i8">D</h2></div>
</div>

<!-- <span class="clear"></span> this keeps the above elements within the parent div -->
Expand Down
6 changes: 3 additions & 3 deletions dist/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function handleMouseUp() {
var elem = evt.targetTouches[0].target.id; //returns the id of the element that triggered the touch
console.log("image id = "+elem); //debugging
for(var i = 0; i < 9; i++) { // for loop to check which element it is and get a number to send to the synth
if(elem === "i"+i){ // this looks confusing because the id name also contains "i" - see that HTML
if(elem === "i"+i || elem === "image"+i){ // this looks confusing because the id name also contains "i" - see that HTML
playSynth(i); // call the playSynth function
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ function handleMouseUp() {
var elem = touches[0].target.id //returns the id of the element that triggered the touch (that has just ended)
console.log("ended image id = "+elem); //debugging
for(var i = 0; i < 9; i++) { //get a number to end the right note
if(elem === "i"+i){
if(elem === "i"+i || elem === "image"+i){
stopSynth(i); // call stopSynth
}
}
Expand Down Expand Up @@ -448,7 +448,7 @@ function changeScaleText() {
for (let i = 0; i < 9; i++) {
let element = `#image${i}`;
let note = notes[i];
document.querySelector(element).innerHTML = `<h2>${note.slice(0, -1)}</h2>`;
document.querySelector(element).innerHTML = `<h2 id="i${i}">${note.slice(0, -1)}</h2>`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ function changeScaleText() {
for (let i = 0; i < 9; i++) {
let element = `#image${i}`;
let note = notes[i];
document.querySelector(element).innerHTML = `<h2 id="i${i}>"${note.slice(0, -1)}</h2>`;
document.querySelector(element).innerHTML = `<h2 id="i${i}">${note.slice(0, -1)}</h2>`;
}
}

Expand Down

0 comments on commit b41e035

Please sign in to comment.