full sections width #56
|
@ -102,9 +102,11 @@ const changeParametres = () => {
|
||||||
length = total_length_mm - fence_length - fence_length
|
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) {
|
if (Math.round(total_length_mm - total_length_calc) > 0 && Math.round(total_length_mm - total_length_calc) <= fence_length) {
|
||||||
full_sections -= 1
|
full_sections -= 1
|
||||||
|
total_length_calc = calc_full_section()
|
||||||
}
|
}
|
||||||
if (Math.round(total_length_mm - total_length_calc) > 0) {
|
if (Math.round(total_length_mm - total_length_calc) > 0) {
|
||||||
form_state.extra_section = total_length_mm - total_length_calc - fence_length
|
form_state.extra_section = total_length_mm - total_length_calc - fence_length
|
||||||
|
|
Loading…
Reference in New Issue