last element
This commit is contained in:
parent
936c58fb4b
commit
ad0a93d295
|
@ -22,9 +22,10 @@ const show_pillar_one = ref(props.index == 1)
|
|||
const show_pillar_two = ref(true)
|
||||
|
||||
const last_element = ref(Math.min((section_count.value + ~~(!!extra_section.value)), max_size.value))
|
||||
watch([section_count, extra_section], () => {
|
||||
watch([section_count, fence_section, extra_section], () => {
|
||||
last_element.value = Math.min(section_count.value + ~~(!!extra_section.value), max_size.value)
|
||||
})
|
||||
|
||||
const getExtraValue = () => (extra_section.value && props.index == last_element.value) ? extra_section.value * 0.001 : false
|
||||
const extra = ref(getExtraValue())
|
||||
if (extra.value) {
|
||||
|
@ -41,7 +42,6 @@ const make_translate_to_section = (source = fence_section.value) => {
|
|||
return r
|
||||
}
|
||||
const translate_to_section = ref(make_translate_to_section())
|
||||
|
||||
watch([fence_section, extra], () => {
|
||||
translate_to_section.value = make_translate_to_section()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue