From ff9167ceaea125f7686ed339043b037d42a4fd58 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Fri, 26 Jul 2024 09:40:14 +0300 Subject: [PATCH] full sections width --- components/calcValues.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/calcValues.vue b/components/calcValues.vue index a350701..4082f31 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -102,9 +102,11 @@ const changeParametres = () => { length = total_length_mm - fence_length - fence_length } } - let total_length_calc = (full_sections * length) + (full_sections * fence_length) + fence_length + const calc_full_section = () => (full_sections * length) + (full_sections * fence_length) + fence_length + let total_length_calc = calc_full_section() if (Math.round(total_length_mm - total_length_calc) > 0 && Math.round(total_length_mm - total_length_calc) <= fence_length) { full_sections -= 1 + total_length_calc = calc_full_section() } if (Math.round(total_length_mm - total_length_calc) > 0) { form_state.extra_section = total_length_mm - total_length_calc - fence_length -- 2.40.1