From d30ac35ce48c6920197cd7ee48b0dd29c22a3f73 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 24 Sep 2024 09:53:09 +0300 Subject: [PATCH] fence section distance --- assets/main.scss | 6 ++++-- components/calcModels.vue | 8 ++++---- components/calcValues.vue | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/assets/main.scss b/assets/main.scss index f9c8282..be0a032 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -281,7 +281,7 @@ label { } 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] { @@ -289,7 +289,8 @@ input[type=checkbox] { } 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 // [&::-moz-range-track]:h-1 // [&::-webkit-slider-thumb]:bg-[#61C4FF] [&::-webkit-slider-thumb]:w-8 @@ -299,6 +300,7 @@ input[type=range] { &::-webkit-slider-runnable-track { @apply h-1 bg-red-500; } + &::-moz-range-thumb, &::-webkit-slider-thumb { @apply bg-[#61C4FF] shadow-red-700; diff --git a/components/calcModels.vue b/components/calcModels.vue index 8e9b45d..a929ec9 100644 --- a/components/calcModels.vue +++ b/components/calcModels.vue @@ -5,8 +5,8 @@ import { degToRad } from 'three/src/math/MathUtils.js'; const section_count = use_section_count() const extra_section = use_extra_section() -const lamelles_count = use_lamelles_count() -const lamelle_height = use_lamelle_height() +const fence_section = use_fence_section() + const defDistance = 3 const controlsState = reactive({ distance: section_count.value, @@ -26,8 +26,8 @@ const cameraStat = reactive({ const camera = ref("camera") -watch([section_count, extra_section], () => { - let v = (section_count.value + ~~(!!extra_section.value)); +watch(fence_section, ()=>{ + let v = fence_section.value * 2; if (v <= defDistance) v = defDistance controlsState.minDistance = v; controlsState.maxDistance = v; diff --git a/components/calcValues.vue b/components/calcValues.vue index 051abc2..7df9ec0 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -155,7 +155,7 @@ const goal = (target: string, params: object) => {
- +