Skip to content

Commit

Permalink
fix: move onchange to js
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasmafra committed Oct 26, 2023
1 parent 9e082ba commit 1a3a2cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div>
<label>Grupo de notas</label>
<select id="noteGroup" onchange="onSelectNoteGroup()">
<select id="noteGroup">
<option value="12notes">12 notas</option>
<option value="17notes" selected>Ciclo das Quintas Básico</option>
<option value="35notes">Ciclo das Quintas Completo</option>
Expand All @@ -20,7 +20,7 @@
</div>
<div>
<label>Escala</label>
<select id="scale" onchange="onSelectScale()">
<select id="scale">
<option value="chromatic">Cromática</option>
<option value="pentatonic">Pentatônica</option>
<option value="natural major" selected>Maior Natural</option>
Expand Down
3 changes: 3 additions & 0 deletions script.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function start() {
scaleCircle = new CircleMaker(onSelectMode);
document.querySelector("#scaleCircle").appendChild(scaleCircle.element);

document.querySelector("#noteGroup").onchange = onSelectNoteGroup;
document.querySelector("#scale").onchange = onSelectScale;

onSelectNoteGroup();
onSelectScale();
}
Expand Down

0 comments on commit 1a3a2cd

Please sign in to comment.