fence section distance

This commit is contained in:
Kseninia Mikhaylova 2024-09-24 09:53:09 +03:00
parent 21a4d71fe6
commit d30ac35ce4
3 changed files with 9 additions and 7 deletions

View File

@ -281,7 +281,7 @@ label {
} }
input { input {
@apply bg-white border border-gray-300 text-gray-900 rounded focus:ring-blue-500 focus:border-blue-500 text-lg p-2.5 disabled:cursor-not-allowed disabled:text-black; @apply bg-white border border-gray-300 text-gray-900 rounded focus:ring-blue-500 focus:border-blue-500 focus-visible:border-blue-500 text-lg p-2.5 disabled:cursor-not-allowed disabled:text-black;
} }
input[type=checkbox] { input[type=checkbox] {
@ -289,7 +289,8 @@ input[type=checkbox] {
} }
input[type=range] { input[type=range] {
@apply bg-neutral-300 appearance-none h-1 ; @apply bg-neutral-300 appearance-none h-1;
// [&::-webkit-slider-runnable-track]:h-1 // [&::-webkit-slider-runnable-track]:h-1
// [&::-moz-range-track]:h-1 // [&::-moz-range-track]:h-1
// [&::-webkit-slider-thumb]:bg-[#61C4FF] [&::-webkit-slider-thumb]:w-8 // [&::-webkit-slider-thumb]:bg-[#61C4FF] [&::-webkit-slider-thumb]:w-8
@ -299,6 +300,7 @@ input[type=range] {
&::-webkit-slider-runnable-track { &::-webkit-slider-runnable-track {
@apply h-1 bg-red-500; @apply h-1 bg-red-500;
} }
&::-moz-range-thumb, &::-moz-range-thumb,
&::-webkit-slider-thumb { &::-webkit-slider-thumb {
@apply bg-[#61C4FF] shadow-red-700; @apply bg-[#61C4FF] shadow-red-700;

View File

@ -5,8 +5,8 @@ import { degToRad } from 'three/src/math/MathUtils.js';
const section_count = use_section_count() const section_count = use_section_count()
const extra_section = use_extra_section() const extra_section = use_extra_section()
const lamelles_count = use_lamelles_count() const fence_section = use_fence_section()
const lamelle_height = use_lamelle_height()
const defDistance = 3 const defDistance = 3
const controlsState = reactive({ const controlsState = reactive({
distance: section_count.value, distance: section_count.value,
@ -26,8 +26,8 @@ const cameraStat = reactive({
const camera = ref("camera") const camera = ref("camera")
watch([section_count, extra_section], () => { watch(fence_section, ()=>{
let v = (section_count.value + ~~(!!extra_section.value)); let v = fence_section.value * 2;
if (v <= defDistance) v = defDistance if (v <= defDistance) v = defDistance
controlsState.minDistance = v; controlsState.minDistance = v;
controlsState.maxDistance = v; controlsState.maxDistance = v;

View File

@ -155,7 +155,7 @@ const goal = (target: string, params: object) => {
<div class="form-row"> <div class="form-row">
<div class="form-item w-full"> <div class="form-item w-full">
<label for="length">Длина ламельного блока, мм</label> <label for="length">Длина ламельного блока, мм</label>
<input :value.input="`${form_state.length.toFixed(0)} мм`" class="w-full" /> <input :value.input="`${form_state.length.toFixed(0)} мм`" :disabled="form_state.auto_length" class="w-full" />
<input id="length" type="range" class="xl:w-full" v-bind="parametric.length" <input id="length" type="range" class="xl:w-full" v-bind="parametric.length"
v-model="form_state.length" :disabled="form_state.auto_length" :ref="form_refs.length" /> v-model="form_state.length" :disabled="form_state.auto_length" :ref="form_refs.length" />
</div> </div>