chore: fix typo in ModalMediaPreviewCarousel.vue

This commit is contained in:
TAKAHASHI Shuuji 2024-03-24 14:38:48 +09:00
parent 660549b08b
commit 335f1f60eb
No known key found for this signature in database
GPG key ID: F15C887632129F5E

View file

@ -15,7 +15,7 @@ const emit = defineEmits<{
const modelValue = defineModel<number>({ required: true }) const modelValue = defineModel<number>({ required: true })
const slideGap = 20 const slideGap = 20
const doubleTapTreshold = 250 const doubleTapThreshold = 250
const view = ref() const view = ref()
const slider = ref() const slider = ref()
@ -147,7 +147,7 @@ function handleLastDrag(tap: boolean, swipe: Vector2, movement: Vector2, positio
let lastTapAt = 0 let lastTapAt = 0
function handleTap([positionX, positionY]: Vector2) { function handleTap([positionX, positionY]: Vector2) {
const now = Date.now() const now = Date.now()
const isDoubleTap = now - lastTapAt < doubleTapTreshold const isDoubleTap = now - lastTapAt < doubleTapThreshold
lastTapAt = now lastTapAt = now
if (!isDoubleTap) if (!isDoubleTap)