This commit is contained in:
Kseninia Mikhaylova 2024-09-18 17:01:13 +03:00
parent 2ed3bea406
commit 6a25442c19
1 changed files with 20 additions and 0 deletions

View File

@ -87,6 +87,26 @@ watch([section_count, fence_section, extra_section], () => {
pillar_two_pos.value = fence_section.value * 0.5 + pillar_size + bSize - 0.01
// translate_to_section.value = make_translate_to_section()
}
if ((section_count.value + ~~(!!extra_section.value)) > 3) {
const total = (section_count.value + ~~(!!extra_section.value))
const size = Math.ceil(total / 4)
console.log({ total, size, index: props.index });
switch(Math.ceil(props.index / size)) {
case 1:
console.log('1')
break;
case 2:
console.log('2')
break;
case 3:
console.log('3')
break;
case 4:
console.log('4')
break;
}
}
})
</script>
<template>