Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a toggle for interval matrix indexing (Issue #411) #500

Closed
wants to merge 7 commits into from
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions src/views/AnalysisView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
}>();

const cellFormat = ref<"best" | "cents" | "decimal">("best");
const indexing = ref(0);
const trailLongevity = ref(70);
const maxOtonalRoot = ref(16);
const maxUtonalRoot = ref(23);
Expand Down Expand Up @@ -100,9 +101,9 @@
<tr>
<th></th>
<th v-for="i of Math.min(scale.size, MAX_SCALE_SIZE)" :key="i">
{{ i }}
{{ i - 1 + indexing.value }}
</th>
<th>({{ scale.size + 1 }})</th>
<th>({{ scale.size + indexing.value }})</th>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In <template> code this is just called indexing. Now it shows NaNs.

</tr>
<tr v-for="(row, i) of matrix" :key="i">
<th>{{ formatMatrixCell(scale.getInterval(i)) }}</th>
Expand Down Expand Up @@ -143,6 +144,28 @@
<label for="format-decimal"> Decimal ratio </label>
</span>
</div>
<div class="control radio-group">
<label>Interval indexing</label>
<span>
<input

Check warning on line 150 in src/views/AnalysisView.vue

View workflow job for this annotation

GitHub Actions / build (17.x)

Replace `⏎············type="radio"⏎············id="indexing-zero"⏎············value=0⏎············v-model="indexing"⏎·········` with `·type="radio"·id="indexing-zero"·value="0"·v-model="indexing"`
type="radio"
id="indexing-zero"
value=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cause the value to become a string which messes up the UI.

v-model="indexing"
/>
<label for="indexing-zero"> 0-indexing (default) </label>
</span>

Check warning on line 158 in src/views/AnalysisView.vue

View workflow job for this annotation

GitHub Actions / build (17.x)

Delete `········`
<span>
<input

Check warning on line 160 in src/views/AnalysisView.vue

View workflow job for this annotation

GitHub Actions / build (17.x)

Replace `⏎············type="radio"⏎············id="indexing-one"⏎············value=1⏎············v-model="indexing"⏎·········` with `·type="radio"·id="indexing-one"·value="1"·v-model="indexing"`
type="radio"
id="indexing-one"
value=1
v-model="indexing"
/>
<label for="indexing-one"> 1-indexing </label>
</span>
</div>
</div>
<div class="columns-container">
<div class="column">
Expand Down