diff --git a/components/calcValues.vue b/components/calcValues.vue index 62f213a..1aab197 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -67,9 +67,6 @@ const changeParametres = () => { } } - if (!form_state.auto_length && (form_state.length > form_state.total_length_mm)) { - form_state.length = form_state.total_length_mm - } form_state.total_length_mm = form_state.total_length * 1000 let { fence_length, total_length_mm, auto_length, length, full_sections } = form_state @@ -107,8 +104,8 @@ const changeParametres = () => { } form_state.full_sections = full_sections - form_state.length = length - form_state.fence_length = fence_length + form_state.length = typeof length == 'string' ? parseFloat(length) : length + form_state.fence_length = typeof fence_length == 'string' ? parseFloat(fence_length) : fence_length copy_form_state = Object.assign({}, form_state) @@ -159,7 +156,7 @@ const goal = (target: string, params: object) => {