From ab8eaa0e035825b2279ba9063eaef1decf9602b9 Mon Sep 17 00:00:00 2001 From: inthar-raven <36112167+inthar-raven@users.noreply.github.com> Date: Tue, 28 Nov 2023 23:14:32 -0500 Subject: [PATCH] Update AnalysisView.vue emit value `intervalMatrixIndex` to persist it --- src/views/AnalysisView.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/AnalysisView.vue b/src/views/AnalysisView.vue index cc55a2c4..a3b31bc8 100644 --- a/src/views/AnalysisView.vue +++ b/src/views/AnalysisView.vue @@ -16,10 +16,19 @@ const props = defineProps<{ scale: Scale; virtualSynth: VirtualSynth; colorScheme: "light" | "dark"; + intervalMatrixIndexing: "zero" | "one"; }>(); +const emit = defineEmits([ + "update:intervalMatrixIndexing", +]); + +const intervalMatrixIndexing = computed({ + get: () => props.intervalMatrixIndexing, + set: (newValue: "zero" | "one") => emit("update:intervalMatrixIndexing", newValue), +}); + const cellFormat = ref<"best" | "cents" | "decimal">("best"); -const intervalMatrixIndexing = ref<"zero" | "one">("zero"); const matrixStartIndex = computed(() => intervalMatrixIndexing.value === "one" ? 1 : 0); const trailLongevity = ref(70); const maxOtonalRoot = ref(16);