diff --git a/components/calcValues.vue b/components/calcValues.vue index ce0d34e..6a3825d 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -62,7 +62,9 @@ const changeParametres = () => { form_state.total_length_mm = form_state.total_length * 1000 if (auto_section_width.value) { let w = parametric.length.max - while (((form_state.total_length_mm % w) > 0) && w > (parametric.length.min + parametric.length.step * 10)) { + let tw_f = (form_state.total_length_mm - form_state.fence_length) + let iw_f = (w - form_state.fence_length) + while ((tw_f % iw_f) && w > (parametric.length.min + parametric.length.step * 10)) { w -= parametric.length.step } form_state.length = w @@ -104,7 +106,11 @@ const setPillarColor = (color: ralTypes) => { pillar_color.value = color } const autoSectionWidth = () => { + const v = auto_section_width.value auto_section_width.value = !auto_section_width.value + if (!v == true) { + changeParametres() + } } const predefLamelleColors = ['3009', '9003', '6027', '5024', '9001', '1012', '3007', '4007'] @@ -175,22 +181,24 @@ const plurals = {
- Забор общей длиной {{ form_state.total_length }}{{'\xa0'}}м,
+ Забор общей длиной {{ form_state.total_length }}{{ '\xa0' }}м,
{{ section_count }}
Всего {{ section_count + ~~(!!form_state.extra_section) + 1 }}
Все элементы окрашиваются порошковым методом:
diff --git a/components/modal.vue b/components/modal.vue
index 4935688..8fea380 100644
--- a/components/modal.vue
+++ b/components/modal.vue
@@ -110,13 +110,16 @@ const submit = (e: any) => {