fix playerList seek
This commit is contained in:
@@ -12,8 +12,8 @@
|
|||||||
<span v-on:click="updateSort('avg_distance')"
|
<span v-on:click="updateSort('avg_distance')"
|
||||||
:class="sortingData.argument == 'avg_distance' ? 'selected' : ''">average distance</span>
|
:class="sortingData.argument == 'avg_distance' ? 'selected' : ''">average distance</span>
|
||||||
</div>
|
</div>
|
||||||
<VirtualList :list="playerList" :row-height="32" v-slot="slotProps">
|
<VirtualList :list="playerList" :row-height="32" v-slot="slotProps" :highlighted="playerHighlighted">
|
||||||
<div :class="'playerRow ' + (slotProps.data.id === $props.playerHighlighted ? 'selected ' : '') + ((slotProps.index + 1)%2 ? 'odd ':'uneven ')" v-on:click="$emit('highlightPlayer', slotProps.data.id)">
|
<div :class="'playerRow ' + (slotProps.data.id === playerHighlighted ? 'selected ' : '') + ((slotProps.index + 1)%2 ? 'odd ':'uneven ')" v-on:click="$emit('highlightPlayer', slotProps.data.id)">
|
||||||
<div><span>{{ slotProps.index+1 }}</span></div>
|
<div><span>{{ slotProps.index+1 }}</span></div>
|
||||||
<div><span>{{ slotProps.data.value.username }}</span></div>
|
<div><span>{{ slotProps.data.value.username }}</span></div>
|
||||||
<div><span>{{ slotProps.data.value.kills }}</span></div>
|
<div><span>{{ slotProps.data.value.kills }}</span></div>
|
||||||
@@ -107,11 +107,6 @@ export default defineComponent({
|
|||||||
if (this.playerHighlighted) this.scrollToPlayer(this.playerHighlighted)
|
if (this.playerHighlighted) this.scrollToPlayer(this.playerHighlighted)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updated () {
|
|
||||||
/* const element = this.$refs['player:' + this.$props.playerHighlighted] as HTMLElement[]
|
|
||||||
if (!element || !element[0]) return
|
|
||||||
element[0].scrollIntoView({ behavior: 'smooth', block: 'center' }) */
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
selectNextPlayer (e: KeyboardEvent) {
|
selectNextPlayer (e: KeyboardEvent) {
|
||||||
const values = {
|
const values = {
|
||||||
|
|||||||
Reference in New Issue
Block a user