lint
This commit is contained in:
parent
b573117423
commit
41ecad7fc0
3 changed files with 20 additions and 15 deletions
|
|
@ -235,7 +235,9 @@ export default {
|
||||||
? mutedStatusHeight
|
? mutedStatusHeight
|
||||||
: normalStatusHeight
|
: normalStatusHeight
|
||||||
|
|
||||||
const anchorIds = computed(() => new Set([mainStatus.value?.id, currentStatus.value?.id]))
|
const anchorIds = computed(
|
||||||
|
() => new Set([mainStatus.value?.id, currentStatus.value?.id]),
|
||||||
|
)
|
||||||
// # Linear style stuff
|
// # Linear style stuff
|
||||||
const isLinearView = computed(() => displayStyle.value !== 'tree')
|
const isLinearView = computed(() => displayStyle.value !== 'tree')
|
||||||
const linearElement = useTemplateRef('linear')
|
const linearElement = useTemplateRef('linear')
|
||||||
|
|
|
||||||
|
|
@ -600,16 +600,18 @@ const Status = {
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$refs.root) {
|
if (this.$refs.root) {
|
||||||
this.resizeObserver.observe(this.$refs.root)
|
this.resizeObserver.observe(this.$refs.root)
|
||||||
this.updateVirtualHeight([{
|
this.updateVirtualHeight([
|
||||||
contentRect: this.$refs.root.getBoundingClientRect()
|
{
|
||||||
}])
|
contentRect: this.$refs.root.getBoundingClientRect(),
|
||||||
|
},
|
||||||
|
])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
this.resizeObserver.disconnect()
|
this.resizeObserver.disconnect()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
hideStatus: function (element) {
|
hideStatus: function () {
|
||||||
if (this.$refs.root) {
|
if (this.$refs.root) {
|
||||||
this.resizeObserver.observe(this.$refs.root)
|
this.resizeObserver.observe(this.$refs.root)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { last, first } from 'lodash-es'
|
import { last } from 'lodash-es'
|
||||||
import { computed, nextTick, ref, toValue, watch } from 'vue'
|
import { computed, nextTick, ref, toValue, watch } from 'vue'
|
||||||
|
|
||||||
import { useWindowSize } from 'src/composables/useWindowSize.js'
|
import { useWindowSize } from 'src/composables/useWindowSize.js'
|
||||||
|
|
@ -45,14 +45,13 @@ export function useVirtualScrolling({
|
||||||
// Map every height and suspendable state
|
// Map every height and suspendable state
|
||||||
const chart = list.value.map((item) => {
|
const chart = list.value.map((item) => {
|
||||||
const { id } = item
|
const { id } = item
|
||||||
const height =
|
const height = (() => {
|
||||||
(() => {
|
if (heights.value.has(id)) {
|
||||||
if (heights.value.has(id)) {
|
return heights.value.get(id)
|
||||||
return heights.value.get(id)
|
} else {
|
||||||
} else {
|
return getPlaceholderHeight(id).value
|
||||||
return getPlaceholderHeight(id).value
|
}
|
||||||
}
|
})()
|
||||||
})()
|
|
||||||
const suspendable = !unsuspendibleIds.value.has(id)
|
const suspendable = !unsuspendibleIds.value.has(id)
|
||||||
return { id, height, suspendable, item }
|
return { id, height, suspendable, item }
|
||||||
})
|
})
|
||||||
|
|
@ -167,7 +166,9 @@ export function useVirtualScrolling({
|
||||||
|
|
||||||
// # Visiblity
|
// # Visiblity
|
||||||
// Add buffer zone to boundary, equal to approx 3 items heights
|
// Add buffer zone to boundary, equal to approx 3 items heights
|
||||||
const bufferZone = computed(() => getPlaceholderHeight().value * (toValue(buffer) ?? 3))
|
const bufferZone = computed(
|
||||||
|
() => getPlaceholderHeight().value * (toValue(buffer) ?? 3),
|
||||||
|
)
|
||||||
|
|
||||||
const heightChartGrouped = computed(() => {
|
const heightChartGrouped = computed(() => {
|
||||||
// Determine visibility state
|
// Determine visibility state
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue