This commit is contained in:
tim
2024-10-22 03:42:08 -04:00
parent 82fccc1be3
commit d33eca6931
12 changed files with 101 additions and 40 deletions

View File

@@ -7,7 +7,7 @@
<v-text-field type="number" v-model="rungs"
density="compact" hide-details class="mx-1 my-2" variant="outlined"
label="Rungs"
:color="color" :base-color="color" min="1"
:color="color" :base-color="color" min="1" :max="MAX_RUNGS"
:disabled="rungsDisabled"
style="width: 4.5em;"
/>
@@ -92,6 +92,7 @@ function setEndpoints(a, b) {
endpoints.value = [devectorize(a), devectorize(b)]
}
const MAX_RUNGS = 10 // todo remove arbitrary limit
const rungs = computed({
get() {
@@ -102,6 +103,8 @@ const rungs = computed({
props.builder.rungs = 1
return
}
if (r>MAX_RUNGS)
r = MAX_RUNGS
let [a,b] = endpoints.value
a = vectorize(a)
b = vectorize(b)