From f4ec4a6f2a822164558d8e6fac0b4a8a01a6816d Mon Sep 17 00:00:00 2001 From: Lumi Pakkanen Date: Wed, 29 Nov 2023 11:36:09 +0200 Subject: [PATCH] Fix type discrepancy in interval matrix index property Fix type discrepancy with radio controls getting numbers and setting strings. --- src/views/AnalysisView.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/AnalysisView.vue b/src/views/AnalysisView.vue index 43bc9dd6..944ba323 100644 --- a/src/views/AnalysisView.vue +++ b/src/views/AnalysisView.vue @@ -20,12 +20,6 @@ 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"); @@ -33,6 +27,12 @@ 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]>(() => { @@ -160,7 +160,7 @@ const matrix = computed(() => { type="radio" id="indexing-zero" value="0" - v-model="intervalMatrixIndexing" + v-model="intervalMatrixIndexingRadio" /> @@ -170,7 +170,7 @@ const matrix = computed(() => { type="radio" id="indexing-one" value="1" - v-model="intervalMatrixIndexing" + v-model="intervalMatrixIndexingRadio" />