Skip to content

Commit

Permalink
Fix type discrepancy in interval matrix index property
Browse files Browse the repository at this point in the history
Fix type discrepancy with radio controls getting numbers and setting strings.
  • Loading branch information
frostburn committed Nov 29, 2023
1 parent 0f76057 commit f4ec4a6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/views/AnalysisView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ const props = defineProps<{
const emit = defineEmits(["update:intervalMatrixIndexing"]);
const intervalMatrixIndexing = computed({
get: () => props.intervalMatrixIndexing,
set: (newValue: string) =>
emit("update:intervalMatrixIndexing", parseInt(newValue, 10)),
});
const audio = useAudioStore();
const cellFormat = ref<"best" | "cents" | "decimal">("best");
const trailLongevity = ref(70);
const maxOtonalRoot = ref(16);
const maxUtonalRoot = ref(23);
const intervalMatrixIndexingRadio = computed({
get: () => props.intervalMatrixIndexing.toString(),
set: (newValue: string) =>
emit("update:intervalMatrixIndexing", parseInt(newValue, 10)),
});
const fadeAlpha = computed(() => 1 - trailLongevity.value / 100);
const backgroundRBG = computed<[number, number, number]>(() => {
Expand Down Expand Up @@ -160,7 +160,7 @@ const matrix = computed(() => {
type="radio"
id="indexing-zero"
value="0"
v-model="intervalMatrixIndexing"
v-model="intervalMatrixIndexingRadio"
/>
<label for="indexing-zero"> 0-indexing (default) </label>
</span>
Expand All @@ -170,7 +170,7 @@ const matrix = computed(() => {
type="radio"
id="indexing-one"
value="1"
v-model="intervalMatrixIndexing"
v-model="intervalMatrixIndexingRadio"
/>
<label for="indexing-one"> 1-indexing </label>
</span>
Expand Down

0 comments on commit f4ec4a6

Please sign in to comment.