diff --git a/src/components/PlayerSelection.vue b/src/components/PlayerSelection.vue index a3b812a..7638590 100644 --- a/src/components/PlayerSelection.vue +++ b/src/components/PlayerSelection.vue @@ -3,12 +3,24 @@
@@ -48,6 +60,7 @@ const usersStore = useUsersStore() const selectedUsers = ref(props.players) const draggedUser = ref(null) +const hoverUser = ref(null) const clearPlayers = () => { if (!usersStore.getCurrentUser || selectedUsers.value.length == 1) { @@ -100,6 +113,7 @@ const dragUser = (from: UserCurrentInfo | null, to: UserCurrentInfo) => { const toIndex = selectedUsers.value.indexOf(to) selectedUsers.value[fromIndex] = to selectedUsers.value[toIndex] = from + draggedUser.value = null emit('update', selectedUsers.value) } @@ -116,6 +130,6 @@ watch( onMounted(() => { // https://www.npmjs.com/package/mobile-drag-drop#:~:text=If%20you%27re%20targeting%20iOS%20Safari%2010.x%20and%20higher - window.addEventListener('touchmove', function () {}, { passive: false }) + window.addEventListener('touchmove', () => {}, { passive: false }) })