Skip to content

Commit

Permalink
fixed naming of css spacing additions for grouped elements (checkbox,…
Browse files Browse the repository at this point in the history
… radio, dropdown)
  • Loading branch information
000masa000 committed Apr 13, 2024
1 parent 52ce45a commit 60ea5a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ function midiNoteOn(index: number, rawAttack?: number, channel?: number) {
rawAttack = 80
}
let frequency = scale.frequencies[index]
// if index out of range calculate frequency directly
if (index < 0 || index > 127) {
frequency = scale.getFrequency(index)
}
let frequency = scale.getFrequency[index]
if (!midi.velocityOn) {
rawAttack = 80
Expand Down
8 changes: 5 additions & 3 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,21 @@ ul.btn-group {
}
.control.checkbox-container {
flex-flow: unset;
gap: 0.15rem 1rem;
}
.control.checkbox-container label {
font-weight: normal;
}
.control.checkbox-group {
flex-flow: unset;
gap: 0.15rem 1rem;
}
.control.radio-group {
gap: 0.15rem 1rem;
}
.control.radio-group span label {
font-weight: unset;
}
.control.select-group {
flex-flow: unset;
.control.dropdown-group {
gap: 0.15rem 1rem;
}

Expand Down
4 changes: 2 additions & 2 deletions src/views/MidiView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ onUnmounted(() => {
/>
</span>
</div>
<div class="control checkbox-container">
<div class="control checkbox-group">
<span>
<input type="checkbox" id="midi-velocity" v-model="midi.velocityOn" />
<label for="midi-velocity"> Use velocity </label>
Expand All @@ -189,7 +189,7 @@ onUnmounted(() => {
</span>
</div>
<label>Settings for multichannel-to-equave mode</label>
<div class="control select-group">
<div class="control dropdown-group">
<span> Center channel <input id="multichannel-center" class="control" type="number" min="1" max="16" value="3" v-model="midi.multichannelCenter" />
</span>
<span> Total equaves <input id="multichannel-num-equaves" class="control" type="number" min="1" max="16" value="8" v-model="midi.multichannelNumEquaves" />
Expand Down

0 comments on commit 60ea5a8

Please sign in to comment.